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.
Summary: | Image are not shown in CSS editor with Rails project | ||
---|---|---|---|
Product: | web | Reporter: | ehartmann <ehartmann> |
Component: | CSS Visual Tools | Assignee: | Marek Fukala <mfukala> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | jkovalsky |
Priority: | P3 | Keywords: | NETFIX |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 182357 | ||
Bug Blocks: | |||
Attachments: | Small patch |
Description
ehartmann
2010-03-19 10:37:27 UTC
Similar issue as the 182357. Once the ProjectWebRootProvider impl is available for rails project, I'll try to plug somehow to the Flying Saucer and do some resources resolving. The FS's XHTMLPanel component is currently set to use an URL as a base to resolve relative links. I haven't found a simple way how to force FS to resolve absolute links to another (different URL). In case of an absolute link FS tries to resolve it against the given URL which of course doesn't work if the resource is not underneath the rendered files's folder. Created attachment 95893 [details]
Small patch
Start some implementation of a workaround
Hi Marek, I may have found a workaround. I've attached a patch for it (this is for trunk version of flying saucer). I spent one hour trying to understand why "edited" variable is null in my code : FileObject edited = FileUtil.toFileObject(FileUtil.normalizeFile(new File(getBaseURL()))); where getBaseURL is the url for the current editing css. But I did not find a clue. Do you have an idea ? ehartmann, thanks for the patch and the investigations. You helped me a lot! I've reimplemented the resolveURI(...) method from your patch, but the you pointed me to the correct place! I would also appreciate if you verify the change. Thank you very much again! fixed in web-main: http://hg.netbeans.org/web-main/rev/20f64c202d4d Hi Marek, I've just tested your modifications. Works fine for me with Rails projects (so I updated the status). If you plan to upgrade flying saucer to trunk version, the fix does not work as the path does not contains //. For instance, the uri given is : for r7 : file:/home/eric/Projets/mr10percent/maquette/public/application/admin/stylesheets//application/admin/stylesheets/images/elbow-minus-nl.gif for trunk : /application/admin/stylesheets/images/elbow-minus-nl.gif -éric Thanks Eric for the information. I'm not sure if I'll update the FS to the newest version or not for now (6.9), more likely I wont. Once FS is updated in next release I'll use your patch. Community contributed patch. Marking with appropriate keyword. Integrated into 'main-golden', will be available in build *201004020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/20f64c202d4d User: Marek Fukala <mfukala@netbeans.org> Log: #182359 - Image are not shown in CSS editor with Rails project |