Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#6811 closed defect (fixed)

TreeStoreModel error in error message

Reported by: guest Owned by:
Priority: low Milestone: 1.2
Component: Dijit Version: 1.1.0
Keywords: TreeStoreModel get root error message Cc: josh@…
Blocked By: Blocking:

Description

On line 968 of Tree.js in 1.1.1 release there is this:

throw new Error(this.declaredClass + ": query " + query + " returned " + items.length + " items, but must return exactly one item");

Unfortunately if this error is thrown a different error appears:

"error loading root: ReferenceError?: query is not defined message=query is not defined"

This appears to be because query is an Object not a string.

I was mistakenly using query="{ id: '*' }" for my model query.

Thanks!

Also, could 1.1.1 be added to the Version dropdown for trac?

Change History (3)

comment:1 Changed 12 years ago by bill

I added 1.1.1 to the dropdown, thanks for pointing that out.

Not sure why you are having that problem, toString(), should fire automatically to convert the object to a string, right? Like for example this works when executed from firebug:

var foo = new Object();
console.log("hello: " + foo);

Does your error occur on firefox?

comment:2 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

(In [14224]) Fixes #6811: query is an object (a hash) so use toJson() to print it. !strict

comment:3 Changed 11 years ago by bill

Milestone: 1.2

marking tickets closed in the last three months w/blank milestone to milestone 1.2.

Note: See TracTickets for help on using tickets.