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.
It seems people do complain about error badges in JS when these are actually not observable in runtime due to templating/embedding. This should be handled in a better way. Step 1) disable error badging on files in embedded case as it used to be and as it is for html, jsp and perhaps others. Step 2) provide a mechanism (perhaps similar to html) to disable errors on files completely
*** Bug 226714 has been marked as a duplicate of this bug. ***
*** Bug 225908 has been marked as a duplicate of this bug. ***
Step 1) fixed in web-main f3de0a1c95ae
Hi Petr, If Step 1 is fixed how can I test it? Also what build will the fix be available in? This issue has been driving me crazy...
(In reply to comment #4) > If Step 1 is fixed how can I test it? > > Also what build will the fix be available in? The integration message should appear here once it is available in daily build. It usually takes a day or so.
Integrated into 'main-silver', will be available in build *201307192300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f3de0a1c95ae User: Petr Hejl <phejl@netbeans.org> Log: #233066 - JS errors caused by templating
web-main branch javascript-errorchecking ff8cd4784d8d This contains a minor change in HTML api thus it is in a branch waiting for Marek's approval. I have to do some more changes in JS itself.
Error hints implemented. web-main branch javascript-errorchecking d93284321e25
The change looks OK. Would be nice if we share the copy pasted code somehow. Some kind of generic API for handling such errors would be very nice.
Merged to trunk 14137839278f. I'm going to close related P3. I'll also file a task for shared api.
(In reply to comment #9) > Some kind of generic API for handling such errors would be very nice. Filed as #233389.
Integrated into 'main-silver', will be available in build *201307252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ff8cd4784d8d User: Petr Hejl <phejl@netbeans.org> Log: #233066 - JS errors caused by templating
*** Bug 226567 has been marked as a duplicate of this bug. ***
You've written that 1) is fixed. I've installed the latest build (201308270854) and I'm still observing theese nasty error icons on folders in project tree. Could you tell please, how can I see that problem is fixed and turn off theese icons? Thank you.
(In reply to zaleks from comment #14) > You've written that 1) is fixed. I've installed the latest build > (201308270854) and I'm still observing theese nasty error icons on folders > in project tree. Could you tell please, how can I see that problem is fixed > and turn off theese icons? > > Thank you. I'm not sure what's the status (Petr Hejl will know more), so just an idea: Did you touched all the files? You need to force them to reindex by changing their timestamps. Then the error badged will be updated as well. Or you can start netbeans w/ a new userdir or delete the cache directory in the userdir instead of the touching the files.
(In reply to Marek Fukala from comment #15) Thank you, but it didnt work 1) I tried to edit and save file and nothing changed. 2) I've removed cachedir and after reindexing badges appeared again.
(In reply to zaleks from comment #16) > (In reply to Marek Fukala from comment #15) > > Thank you, but it didnt work > 1) I tried to edit and save file and nothing changed. > 2) I've removed cachedir and after reindexing badges appeared again. The fix for this issue apply only to JS embedded in other language such as HTML/PHP. If you have plain old js file the badges are there.
> The fix for this issue apply only to JS embedded in other language such as > HTML/PHP. If you have plain old js file the badges are there. I understand this. I have no problems with plain js files, problem is in JS, embedded into html-template file using '{' and '}' for templating purposes.
(In reply to zaleks from comment #18) > > The fix for this issue apply only to JS embedded in other language such as > > HTML/PHP. If you have plain old js file the badges are there. > > I understand this. I have no problems with plain js files, problem is in JS, > embedded into html-template file using '{' and '}' for templating purposes. Please share a sample file with us. Thanks.
> Please share a sample file with us. Thanks. I'm sorry. Now I can see, that problem with inline js is really fixed. I had another problem in the same file, thats why I was confused. Another problem is - inline css :) Like this: <a style="float: {S_CONTENT_FLOW_END};">...</a> - example taken from one file of phpbb engine. I understand, that it is bad coding-style, it will be better to use class here, but it is not my code - it is phpbb, which I'm just using in my project, and I cant fix all these inline css. So it will be great to disable badges for inline css also, like you've done it for inline js. Sorry for confusion. And thank you for quick replies.
Please attach the file so I can try it. The errors in embedded around a templating code should be suppressed.
Created attachment 139375 [details] short example of html template with inline css
*** Bug 235822 has been marked as a duplicate of this bug. ***
*** Bug 225036 has been marked as a duplicate of this bug. ***
Same problem here with PHP tags in inline CSS. As zaleks@netbeans.org case, I work with legacy code and I have hundreds of files affected. It worked OK in NB 7.3.1. You can see and example here: <div id="errbusc" style="position:absolute; left:490px; top:271px; width:251px; height:123px; z-index:10; padding:16; border: 4 #FFF7D9 solid;<? if($error == 2) echo "visibility:visible"; else echo "visibility:hidden"; ?>"> Error </div> If I remove the PHP tags, the file is parsed correctly.
Please submit a new issue against web/css editor. Your sample is not related to JavaScript. Closing again
(In reply to Vladimir Riha from comment #29) > Please submit a new issue against web/css editor. Your sample is not related > to JavaScript. Closing again The problem is that our bug reports are marked as duplicates, but they are not! Look here https://netbeans.org/bugzilla/show_bug.cgi?id=237669
OK, moving discussion to the issue 237699 so we don't spam others.