Opened 5 years ago

Closed 5 years ago

#18320 closed defect (invalid)

Building dojo 1.10.1 breaks path references to nls in script tags

Reported by: fphan Owned by:
Priority: undecided Milestone: tbd
Component: BuildSystem Version: 1.10.1
Keywords: Cc:
Blocked By: Blocking:

Description

Try building 1.10.1 using this following simple build profile for an app that uses a ValidationTextBox? on a Form with a Submit button:

var profile = (function(){
    return {
        basePath: "./src",
        releaseDir: "../app",
        releaseName: "lib",
        action: "clean,release",
        optimize: "shrinksafe",
        layerOptimize: "shrinksafe",
        cssOptimize: 'comments',
        mini: true,
        selectorEngine: "lite",
 
        packages:[{
            name: "dojo",
            location: "dojo"
        },{
            name: "dijit",
            location: "dijit"
        },{
            name: "dojox",
            location: "dojox"
        },{
            name: "app",
            location: "app"
        }],
 
        layers: {
            "app/app": {
            	include: [ "dojo/parser", "dojo/dojo", "dojo/domReady", "dijit/form/Form", "dijit/form/SimpleTextarea", "dijit/form/ValidationTextBox", "dijit/form/Button", "dijit/form/RadioButton" ],
                customBase: true,
                boot: true
            }
        }
    };
})();

When running the web page, the failed scripts in the header are all trying to look for the path ../app/nls/app_en-us.js regardless of the location of the page in the directory hierarchy. The problem occurs even when using closure to optimize. The problem seems to be stemming from the following line:

'*now':function(r){r(['dojo/i18n!*preload*novia/nls/test*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]']);} 

which is mentioned in the summary comment of the load function in dojo.js.uncompressed.js:

"*now":function(r){r(['dojo/i18n!*preload*<path>/nls/<module>*<JSON array of available locales>']);}

Commenting out that line in the built .js file only leads to the same problem with other modules, such as {{{../dijit/form/n

Change History (5)

comment:1 Changed 5 years ago by fphan

Commenting out that line in the built .js file only leads to the same problem with other modules, such as ../dijit/form/nls/validate.js.

comment:2 Changed 5 years ago by fphan

I need to be able to do a build on this ASAP.

comment:3 Changed 5 years ago by fphan

Also, using soria css, the rendering of the buttons differ between unbuilt and built Dojo.

comment:4 Changed 5 years ago by fphan

After corresponding with snover, I learned that "app/app" must be replaced by "dojo/dojo" in the layers element; the "dojo/dojo" must always be present while any other custom package/module is optional. I don't think this point was made clear in the Build documentation/tutorial. This fixes the problem.

As for the button rendering, it lost the 3D effect because the css lost reference to the buttonEnabled image (which is under dijit/themes folder) because I had moved the css out of its original location in the build release folder and placed it in another "css" folder. The rendering is fixed now that I've put the css back to its original place.

This ticket can be closed.

comment:5 Changed 5 years ago by bill

Component: GeneralBuildSystem
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.