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.

Bug 236494 - Class selector with = in name marked as error when used in HTML file
Summary: Class selector with = in name marked as error when used in HTML file
Status: RESOLVED WORKSFORME
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@web
URL:
Keywords:
: 240422 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-28 01:21 UTC by luiz_bonfa
Modified: 2014-07-28 09:12 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
an example file (3.47 KB, application/php)
2013-09-28 01:21 UTC, luiz_bonfa
Details
another example file (3.47 KB, application/php)
2013-09-28 01:21 UTC, luiz_bonfa
Details
another example file (19.42 KB, text/css)
2013-09-28 01:23 UTC, luiz_bonfa
Details
another example file (38.64 KB, text/css)
2013-09-28 01:24 UTC, luiz_bonfa
Details
another example file (13.91 KB, text/css)
2013-09-28 01:25 UTC, luiz_bonfa
Details
another example file (2.65 KB, application/php)
2013-09-28 01:26 UTC, luiz_bonfa
Details
another example file (1.62 KB, text/css)
2013-09-28 01:28 UTC, luiz_bonfa
Details
another example file (1.10 KB, text/css)
2013-09-28 01:29 UTC, luiz_bonfa
Details
another example file (7.79 KB, text/css)
2013-09-28 01:31 UTC, luiz_bonfa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description luiz_bonfa 2013-09-28 01:21:06 UTC
Created attachment 140590 [details]
an example file

My PHP project was  successfully hosted by NetBeans 7.1.2 for many months. 
Now in NetBeans 7.4 RC1  some files (dozens of them)  are flagged as having errors  . Those  files belong to multiple frameworks (Joomla, T3v3, JoomlaBamboo etc) so they cannot be modified to eliminate these so called "errors" 

I attach several files of different types: .css, .less, .php  just as examples.
Comment 1 luiz_bonfa 2013-09-28 01:21:50 UTC
Created attachment 140591 [details]
another example file
Comment 2 luiz_bonfa 2013-09-28 01:23:40 UTC
Created attachment 140592 [details]
another example file
Comment 3 luiz_bonfa 2013-09-28 01:24:40 UTC
Created attachment 140593 [details]
another example file
Comment 4 luiz_bonfa 2013-09-28 01:25:33 UTC
Created attachment 140594 [details]
another example file
Comment 5 luiz_bonfa 2013-09-28 01:26:45 UTC
Created attachment 140595 [details]
another example file
Comment 6 luiz_bonfa 2013-09-28 01:28:03 UTC
Created attachment 140596 [details]
another example file
Comment 7 luiz_bonfa 2013-09-28 01:29:42 UTC
Created attachment 140597 [details]
another example file
Comment 8 luiz_bonfa 2013-09-28 01:31:18 UTC
Created attachment 140598 [details]
another example file
Comment 9 Vladimir Riha 2013-10-02 07:04:07 UTC
Thank you for reporting. I've checked first few and seems to be caused by CSS, not PHP. I'll separate those cases and file new issues against css/less
Comment 10 Ondrej Brejla 2013-10-02 08:07:47 UTC
I just tested attached PHP files and errors are marked inside a html class attribute value, so it's a CSS issue. Reassigning to CSS for evaluation, thanks.
Comment 11 Vladimir Riha 2013-10-02 08:14:16 UTC
attachment 140590 [details] + 140591: caused by using "=" in class attribute value, e.g.

<div class="test=w1"></div>



The rest attachments:
=======================

attachment 140592 [details]: caused by @extension used in CSS file. What is @extension? I didn't find this at-rule in any specification. Only mention I've found is related to XMLMind editor.

attachment 140593 [details] + 140594: Less issue caused by > usage like. I think this is covered by issue 232960

.button2-right {
	#gradient > .vertical(@gradientTop, @gradientBottom);
}


attachment 140595 [details] + 140596: caused by usage of "only" as class selector, already reported in issue 231249

attachment 140597 [details]: caused by IE expression, already reported as issue 230042

attachment 140598 [details]: I don't think this is valid media query syntax (see [1]), it looks like

(a)  @media only screen and max-width 600px  {}

while I think it should be

(b)  @media only screen and (max-width: 600px){}

I've tried simple test in browser and styles defined in media query (a) were not applied to document. After modifying (a) to look like (b), it was OK. So I really think this is incorrect syntax. 



======================

To wrap up, 3 issues are left here but I think 2 are caused by wrong syntax:
 1) "=" in class selector name and it usage in HTML editor - valid issue
 2) @extension at-rule in CSS file
 3) @media only screen and max-width 600px  {}


I'll change title of this bug to reflect issue 1). Reassigning to CSS editor.




[1] http://www.w3.org/TR/css3-mediaqueries/#syntax
Comment 12 luiz_bonfa 2013-10-02 15:07:45 UTC
@Vladimir Riha

Vladimir, I think you miss the point. All the files that I attached are taken from the PHP Project that exists for a couple of years. All those files belong to the frameworks that are *used* in this project. So there is no way I can modify them according with anybody's opinion about their syntax.  

The important fact is that I have  this project "as is"  opened now (and for the last several months)  in NetBeans 7.1.2 and it does not cause any problems and any flagging for any reason and it runs perfectly. So I have an obvious requirement that it would be compatible also with NetBeans 7.4 without any changes.

I also think that renaming the title to some specific one  is a bad idea. It just defeats the point. We agreed a couple of days ago (and actually it was your idea) that I create some general title for this case  so that I can  put *all* possible issues related to flagging under this umbrella. I did exactly that and I have many more files in the project that are still flagged and I will keep adding them to this case till all of them will disappear in 7.4.

More than that this is not the only project that I have that is not accepted by the current version of NetBeans 7.4 but are OK under 7.1.2. 
So until everything is fixed in NetBeans IDE itself we  simply cannot use it weather it is RC1 or official release.
Comment 13 Vladimir Riha 2013-10-02 15:43:33 UTC
(In reply to luiz_bonfa from comment #12)
> files belong to the frameworks that are *used* in this project. So there is
> no way I can modify them according with anybody's opinion about their
> syntax.  

I only evaluated these problems and point to some already reported issues. There are 3 problems left here that are not covered in any issue, see comment #11. 

As I wrote, I haven't found anything about the @extension at-rule. 

I do believe the syntax of the media query is wrong (and simple test in Chrome and in CSS validator [3] supports it). You can check CSS specification [1]. It is not my opinion about syntax, it is CSS specification.

Marek, could you please also have a look at it? If I'm wrong, I'll report these issues and add their numbers here. Thanks in advance.


> We agreed a couple of days ago (and actually it was
> your idea) that I create some general title for this case  so that I can 
> put *all* possible issues related to flagging under this umbrella

I see, this is unfortunate misunderstanding. I asked you to report it to ide/code but not to aggregate several problems into single issue. Please see [2] for guidelines how to report issues.


[1] http://www.w3.org/TR/css3-mediaqueries/#syntax
[2] http://wiki.netbeans.org/IssueReportingGuidelines
[3] http://jigsaw.w3.org/css-validator
Comment 14 luiz_bonfa 2013-10-02 16:12:56 UTC
Even if something is not in sync with the spec it still exists in third-party's code and it is not under my control to modify this code. Those peculiarities of the code will exist till the authors of multiple frameworks decide to fix them. 
 
The important fact (and you seem to ignore it)  is that 7.1.2 is perfectly fine with the whole project and all of those sample files, and 7.4 is not. If backward compatibility is not the goal for  NetBeans 7.4 please announce it openly and we will consider switching to Aptana or some other great IDE. 

If it is more convenient for you guys and is in line with your guidelines I  can create about a hundred new cases and attach single flagged file to each of them. Then you will triage each of them and assign each particular case to the  appropriate code/section/department or whatever. 

Will it help to create a hundred of new cases?

Or as an alternative, I can send to you the whole project. You will be able to open it in 7.1.2 and in 7.4. and see the differences. The project is about 30MB but ... who counts? :)
Comment 15 Vladimir Riha 2013-10-03 12:23:26 UTC
(In reply to luiz_bonfa from comment #14)
> Even if something is not in sync with the spec it still exists in
> third-party's code and it is not under my control to modify this code. Those
> peculiarities of the code will exist till the authors of multiple frameworks
> decide to fix them. 

Talking about the wrong media query issue, maybe you could also file report against such framework or contact its author to fix it. Of course this is just one case.

  
> The important fact (and you seem to ignore it)  is that 7.1.2 is perfectly
> fine with the whole project and all of those sample files, and 7.4 is not.

I've tried files attached here in NetBeans 7.1.2 and it shows even more errors than in NetBeans 7.4 RC2 (meaning it has been fixed since 7.1.2). The problems that are visible in 7.4 are also marked in 7.1.2 as error. 

But the difference is that in 7.1.2, files (folders) don't have error badges in such case. Please, have a look at issue 141181, which is about being able to suppress these errors. I guess this will help with the e.g. @extension at-rule which seems to be some 3rd party syntax for XMLMind editor and in other cases as well.
Comment 16 luiz_bonfa 2013-10-03 21:18:50 UTC
>Talking about the wrong media query issue, maybe you could also file report against such framework or contact its author to fix it. 
************************
I will try to contact the vendor about it.
 
>I've tried files attached here in NetBeans 7.1.2 and it shows even more errors than in NetBeans 7.4 RC2 (meaning it has been fixed since 7.1.2). The problems that are visible in 7.4 are also marked in 7.1.2 as error. 
************************
This is an interesting observation. You are right, many files that not flagged in the project tree still have error/warning flags inside the code.  In real life we almost never look into the core/framework  code unless there is a compelling reason to do that. But 7.1.2 does not show error badges for the folders and files and the whole project looks absolutely OK. So there was no reason to analyze the code itself.

BTW,  I have in front of me one sample file with the flag in the code in 7.4 and not in 7.1.2  It is .less file and pre-compilers probably were out of NetBeans scope at the time of 7.1.2.

Anyway, having the project with red badges attached to a lot of folders and files  is really bad thing. It is like driving a car when you see  red lights everywhere around you. Even if you know that they are just "warning" lights and not real traffic lights you simply cannot drive normally and will hit the brakes all the time. 
 
>Please, have a look at issue 141181, which is about being able to  suppress these errors.  
*************************
I looked at the  141181 and this is just an enhancement proposal with no obligation to implement and no date of completion in sight. We all know what happens to the "nice to have" enhancements. Most probably this "suppression of errors" will not be available in foreseeable future. 

So the bottom line is that we need to stay with 7.1.2 forever or to look at some other IDEs.
 
My reason for moving to 7.4 was support that was promised for CSS/LESS debugging (source maps).  Probably I'll have to look for it elsewhere. Too bad. Actually I liked NetBeans and would continue using it if not this nasty error badges problem.
Comment 17 Marek Fukala 2014-02-17 13:53:41 UTC
Luiz, each of the css errors have special hintfix "suppress in this file/folder/project". Please use it to suppress the issues for the whole project or folder.

As Vlada pointed out, most of the issue are already filled, and the rest doesn't seem to be P2 to me.
Comment 18 luiz_bonfa 2014-02-17 18:21:26 UTC
(In reply to Marek Fukala from comment #17)
> Luiz, each of the css errors have special hintfix "suppress in this
> file/folder/project". Please use it to suppress the issues for the whole
> project or folder.
 
Can you please clarify where to find this "hintfix"?  I see the file flagged as having an error, I see the particular line in .css file that is flagged as error. But there is no way to ask to suppress flagging (I tried righ-click menus and looked at the properties screen).
Comment 19 Vladimir Riha 2014-02-18 13:59:07 UTC
If you click on the bulb icon next to the line number in editor, there is option to filter out css errors
Comment 20 luiz_bonfa 2014-02-18 16:38:56 UTC
(In reply to Vladimir Riha from comment #19)
> If you click on the bulb icon next to the line number in editor, there is
> option to filter out css errors


Unfortunately it does not remove the flags as advertised. All I see is an endless refreshing indices and scanning that cannot be canceled for hours.
Finally, I am done fighting  with the deficiencies of NetBeans.  I have been doing it now for 6 months as you can see from this comments thread. You can close the issue. 
After the decent version 7.2 the versions 7.3 and 7.4 are absolutely unusable for me. I will switch to some other coding environment, thanks god we have a lot of choices these days.
Comment 21 Vladimir Riha 2014-04-04 07:31:47 UTC
*** Bug 240422 has been marked as a duplicate of this bug. ***
Comment 22 _ gtzabari 2014-04-06 15:24:09 UTC
Target milestone needs to be reevaluated.
Comment 23 Marek Fukala 2014-07-28 09:12:46 UTC
>Unfortunately it does not remove the flags as advertised. 

Works fine for me. If I apply the 'Filter out CSS parsing errors in ${project_home}' fix the files' and and project's error badges are removed.