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 194382 - [70cat] Editor thinks PHP file is HTML file and shows HTML doctype error
Summary: [70cat] Editor thinks PHP file is HTML file and shows HTML doctype error
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-15 11:46 UTC by Sc0tTyXL
Modified: 2011-01-19 06:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (167.79 KB, image/png)
2011-01-15 11:46 UTC, Sc0tTyXL
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sc0tTyXL 2011-01-15 11:46:07 UTC
Product Version = NetBeans IDE Dev (Build 201101140000)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_23
Runtime = Java HotSpot(TM) Client VM 19.0-b09

Take a look at the screenshot :)
Comment 1 Sc0tTyXL 2011-01-15 11:46:45 UTC
Created attachment 105025 [details]
Screenshot
Comment 2 Petr Pisl 2011-01-17 13:13:40 UTC
Marek we talked about this. I can see still in development build a warning about disabling html checking and also the navigator shows <html>, <head> and <body> tags, that are not defined in the php file.
Comment 3 Marek Fukala 2011-01-17 14:01:17 UTC
What the screenshot shows is the correct state. The file is not pure html so you may decide whether you want the validator to validate it or not. By default the validation is disabled for all non-pure html mimetypes. You can enable the validation by the hint and then disable it per file or per mimetype on the hints attached to each validation errors.

I do not see any doctype error in the screenshot ;-)

As for the tags in the navigator, I know there is an issue for that, I cannot find it now :-|. In any case the fix is not that easy as it may seem to be. I can do at least a workaround for empty files - no nodes will be shown. Do you want this?
Comment 4 Sc0tTyXL 2011-01-18 11:19:38 UTC
Hey Marek,

Yes, if you could just hide them if they are empty, it should be fine imho, i already have an issue for that : 194381.
Or the possibility to disable the split of html/php ( disable the html view ).
I dont use ?> <?php to display html, i put it in strings, so for me that view is annoying.

The other thing, well i thought it gave that message because it couldn't find a doctype. I just that warning is very wierd since i'm editing a .php file + starts and ends with <?php ?>
Comment 5 Marek Fukala 2011-01-18 15:50:05 UTC
I've added the HintSeverity.INFO enum type to the csl.api and used in the HtmlHintsProvider. The severity level is mapped to org.netbeans.spi.editor.hints.Severity.HINT which shows just the bulb, no text is underlined and does NOT affect the status of the file so your file remains "green" even with those hints.

web-main#552b1eb313e6
Comment 6 Marek Fukala 2011-01-18 17:20:39 UTC
I've also fixed the issue 194381  in web-main#7de8cca6763e
Comment 7 Quality Engineering 2011-01-19 06:33:05 UTC
Integrated into 'main-golden', will be available in build *201101190000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/552b1eb313e6
User: Marek Fukala <mfukala@netbeans.org>
Log: #194382 - [70cat] Editor thinks PHP file is HTML file and shows HTML doctype error