Opened 15 years ago

Closed 15 years ago

#2657 closed defect (wontfix)

'intern-strings' does not correctly expand URLs inside of CSS

Reported by: bradneuberg Owned by: James Burke
Priority: high Milestone: 1.0
Component: BuildSystem Version: 0.4.2
Keywords: Cc:
Blocked By: Blocking:


The Dojo build system's 'intern-strings' directive is meant to inline widget HTML and CSS resources directly into the generated dojo.js file. If that CSS file contains a URL directive, such as the following from EditorToolbar?.css:

.dojoE2TBIcon {

background-image: url(buttons/aggregate.gif);


the 'intern-strings' widget doesn't correctly expand this into a relative address that is now relative to dojo.js, rather than the src/widgets/templates/ directory. This causes it to break and not display our images.

This impacts the Editor2 widget, which has a system to bundle up all the toolbar images into a single GIF file, which it then references using a CSS url() directive and CSS clipping directives to get each icon seperately. This can speed up page load time since all the GIF resources are essentially in one file. Without fixing this 'intern-strings' bug though, this doesn't work, which affects me with Moxie and Dojo Offline, contributing to slow page load.

I have attached a patch to fix this issue, applied to the file

Attachments (1) (1.1 KB) - added by bradneuberg 15 years ago.
Diff with patch to fix bug

Download all attachments as: .zip

Change History (8)

Changed 15 years ago by bradneuberg

Attachment: added

Diff with patch to fix bug

comment:1 Changed 15 years ago by bradneuberg

Hold off on integrating this patch -- there's a bug in it that I'm still tracking down.

comment:2 Changed 15 years ago by bill

In dijit we've gotten rid of templateCssPath altogether; I'll leave this bug open though, just in case we want to merge it to a 0.4.3, or if we change our mind about supporting templateCssPath in dijit.

comment:3 Changed 15 years ago by James Burke

I think the way to fix this is by modifying the module's JS code that uses the interned string to hold on to the original path, and pass the path to the dojo.html.insertCssText() method and have that method fix the paths at runtime. This is what happens for templateCssPath/String variables inside widgets.

comment:4 Changed 15 years ago by Adam Peller

Owner: changed from alex to James Burke

comment:5 Changed 15 years ago by James Burke

Milestone: 1.0
Resolution: wontfix
Status: newclosed

comment:6 Changed 15 years ago by James Burke

Resolution: wontfix
Status: closedreopened

comment:7 Changed 15 years ago by James Burke

Resolution: wontfix
Status: reopenedclosed

This use case is obsolete in 1.0.

Note: See TracTickets for help on using tickets.