This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Loaded an existing PHP project. Opened a PHP source file and got a very strange error: 'Encountered " "}" "}"" at line 19, column 1. Was expecting one of: <S>... ":"... Unknown property PHP_CODE' This error is shown against line 103 !!!
Created attachment 59342 [details] Screen shot of error
Created attachment 59819 [details] The offending PHP document
Please evaluate, thanks.
Marek, could you evaluate this?
This seems only to happen when php code is embedded in the style attribute as in:- <html> <head> <title></title> </head> <body> <?php $style = 'margin-top:50px'; ?> (!) <p style="<?php echo $style ?>">The boy stood on the burning deck...</p> </body> </html> In this instance the it is saying the error is at line 3, column 1 (?)
This is know issue, problem is in css virtual source generation. In fact it is duplicate of issue 132866 but I'll keep it open so I do not forget to fix the php version of the model css generator.
The number of next version is already known -> moving from TM Dev to 6.5
already fixed
oops, not fixed
Another problem with the style attribute I've noticed in a very recent dev build. This may have been in for a while as I haven't used PHP for a couple of weeks. The first 8 characters of the style attribute are bold, the remainder is normal weight. See screen shot (admin.php - already uploaded).
Created attachment 62277 [details] Screen shot of style attribute highlight problem
The style attribute problem (benning of the value in bold blue font) has already been fixed. As for the original problem - syntax error reported at the place of php code inside style attribute value - the generated css virtual source contains unparsable text: " SELECTOR { PHP_CODE } " Some level of virtual source sanitization like done for JSPs is needed here. I'll try to use the same solution as for JSP here.
I obtained more complains about this from more users. As carentica wrote, the problem is in style attribute. <div class="infmnu" style="height:<?php echo "{$bodyh}px" ?>;">
Because this issue is very visible and we have more complains about this, I'm increasing priority to P2.
BTW, could there be an analogous problem for Ruby (RHTML/ERb) and Groovy Server Pages (GSP)?
sure, for all templating languages. I'll try to make the solution as less as possible temp. lang. specific. An obstacle may be existence of multiple implementations of the css model provider.
fixed, the fix applies for all templ. languages: jsp, gsp, php, rhtml changeset: 98984:a09913c4af2b tag: tip user: Marek Fukala <mfukala@netbeans.org> date: Tue Sep 02 14:52:32 2008 +0200 summary: #131517 - Strange error "Unknown property PHP_CODE"
Integrated into 'main-golden', will be available in build *200809031401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a09913c4af2b User: Marek Fukala <mfukala@netbeans.org> Log: #131517 - Strange error "Unknown property PHP_CODE"