apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.64k stars 843 forks source link

HTML 'Class not found' errors when using CDN stylesheet #5276

Open paulfrancis556 opened 1 year ago

paulfrancis556 commented 1 year ago

Apache NetBeans version

Apache NetBeans 16

What happened

When adding bootstrap (or other frameworks) in a html/php project using a CDN directly, the remote file isn't parsed/cached so any CSS class used within the html page generates a "Class ... not found" error/warning light bulb.

Large projects that use CDNs thus have hundreds of warning light bulbs unnecessarily.

How to reproduce

Create a basic HTML or PHP Project.

Put this code in the index.html/index.php file

<html>
    <head>
        <link rel="stylesheet" href="https//cdnjs.cloudflare.com/ajax/libs/bootstrap/4.5.3/css/bootstrap.min.css">
    </head>
    <body>
        <div class="container">
            <div class="row">
                <div class="col">
                    Hello
                </div>
            </div>

        </div>
    </body>
</html>

Lines 6, 7 & 8 shows errors/warnings

image

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 10

JDK

19

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

Chris2011 commented 1 year ago

I guess it was never implemented so it is a whole new feature. Due to check whether it makes a difference of downloading the file and put it in the same folder.