Opened 7 years ago

Closed 7 years ago

#15290 closed defect (fixed)

dojo 1.7 build shrink with non 'en' locale does not work for IE7/IE8

Reported by: tanneman Owned by: Rawld Gill
Priority: high Milestone: 1.8
Component: BuildSystem Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

Steps to reproduce

  • Unzip this zip on a webserver and open the page in IE7/IE8

Expected

  • No script error, a dialog appears with the text hello

Actual

  • A script error occurs: 'bases' is null or not an object

The problem

We have used the new dojo build system to shrink the javascript and this gives problems when using the following combination:

  • Use a shrinked build
  • Using dijit/Dialog in the shrinked build
  • Using a locale other than english (we use 'nl' in the example)
  • Use browser IE7 or IE8

When using this combination it will give the error:

'bases' is null or not an object

I made a test page to reproduce the bug. The test page uses a dojobase.js which is in fact a shrinked build of the dijit.Dialog.

dojobase.js was created using the profile below:

var profile = {
	basePath : "target/dojo-release-1.7.2-src/",
	layerOptimize : "shrinksafe",
	cssOptimize : 'comments',
	hasReport : true,
	layers : {
		"test/dojobase" : {
			include : [ "dijit/Dialog" ]

		}
	},
	releaseDir : "./release",
	packages : [ {
		name : "dojo",
		location : "./dojo"
	}, {
		name : "dijit",
		location : "./dijit"
	}, {
		name : "dojox",
		location : "./dojox"
	} ]
};

These are the parameters used when creating the release build:

load=build
action=clean,release
localeList=en,nl

After debugging the code it failed in the function Dialog.postMixinProperties, when executing the line:

i18n.getLocalization("dijit", "common");

Workaround

In /nls/dojobase_nl.js when I change the define calls from [dijit/nls/nl/common]

to [dijit/nls/common/nl] it works!

Attachments (1)

reproduce.zip (80.9 KB) - added by tanneman 7 years ago.
bug15290.zip

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by tanneman

Attachment: reproduce.zip added

bug15290.zip

comment:1 Changed 7 years ago by Rawld Gill

Milestone: tbd1.8
Priority: undecidedhigh
Resolution: fixed
Status: newclosed

Hi tanneman, thanks for the excellent report!

There were a few bugs in 1.7 w/ built, flattened locales. These have been fixed in trunk. I tried your example with trunk and it works OK. Please pull trunk and try again (note that you won't be able to use the CDN). We'll be going to 1.8 beta soon, so this shouldn't be too far off.

Note: See TracTickets for help on using tickets.