Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10175 closed defect (invalid)

StackContainer doesn't startup when using a build

Reported by: John Locke Owned by: James Burke
Priority: high Milestone: tbd
Component: BuildSystem Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Hi,

Hit a really strange issue, when upgrading to 1.4.0b1 and also trunk, when using a Dojo build with dojox.layout.Wizard. I traced the problem up to NodeList?.map, but don't see what the problem is.

To reproduce:

  1. Create a build that contains a StackContainer?-based widget (I hit this first in dojox.widget.Wizard)
  2. Add it to a page using markup

Result: fatal javascript error in dojo.addClass, "node" is null.

Reason: dijit._Container.getChildren calls dojo.query().map(), and the result is a collection of domNodes instead of widgets.

Through testing on Firebug, you can see the problem:

x = new dojo.NodeList;
x.push(1,2,3,4,5);
x.map(function(i){return i+1;})

... expected result, and what you get if you have regular, un-built dojo loaded: [2,3,4,5,6]

... result when you have a build: [1,2,3,4,5]

Note that dojo.map works correctly--NodeList?.map has the issue.

Change History (6)

comment:1 Changed 10 years ago by bill

Component: GeneralBuildSystem
Description: modified (diff)
Owner: changed from anonymous to James Burke

This is working for me. I did a:

./build.sh profile=demos-all action=release

And then I modified test_Button.html to have the first two requires as:

dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.dijit-all"); 

dijit-all.js contains StackContainer as you instructed.

Then from the Firebug console (FF3.5/mac) I do:

x = new dojo.NodeList;
x.push(1,2,3,4,5);
x.map(function(i){return i+1;})

It's returning 2,3,4,5,6 for me as expected.

Does that work for you? Maybe you have something weird in your build... you need to provide an exact profile of a build and test file which reproduce the problem.

comment:2 Changed 10 years ago by bill

PS: test_TabContainer.html is also working fine for me (again on FF3.5/mac).

comment:3 Changed 10 years ago by John Locke

Ok, my mistake. It turns out there was an old build file of plugd that was conflicting with the NodeList?.map function. Still not sure exactly what the problem is, but removing this file from the environment made the problem disappear.

Bug can be closed--external problem. Sorry for the noise!

Cheers, John

comment:4 Changed 10 years ago by bill

Resolution: invalid
Status: newclosed

comment:5 Changed 10 years ago by dante

John - is there a bug present in plugd still here? Have you updated to plugd trunk?

comment:6 Changed 10 years ago by John Locke

I don't think so... this was a project started by someone else, and it looks like a built version of plugd was getting loaded, but it wasn't built with the rest of Dojo. Result: conflict. Turns out we weren't using it anyway.

Note: See TracTickets for help on using tickets.