Opened 8 years ago

Closed 7 years ago

#12744 closed defect (fixed)

dojox.data.JsonQueryRestStore requires dojox.data.ClientFilter

Reported by: flammon Owned by: Kris Zyp
Priority: high Milestone: 1.8
Component: DojoX Data Version: 1.6.0
Keywords: JsonQueryRestStore, ClientFilter Cc:
Blocked By: Blocking:

Description

When dojox.data.JsonQueryRestStore? is loaded without dojox.data.ClientFilter? an exception is thrown as follows.

dojo.require("dojox.data.JsonQueryRestStore");

uncaught exception: Could not load cross-domain resources: dojox.data.JsonQueryRestStore? http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojox/data/JsonQueryRestStore.xd.js

The workaround is to simply load dojox.data.ClientFilter?

dojo.require("dojox.data.ClientFilter");
dojo.require("dojox.data.JsonQueryRestStore");

Change History (3)

comment:1 Changed 8 years ago by bill

Component: GeneralDojoX Data
Owner: set to Kris Zyp

comment:2 Changed 8 years ago by Kenneth G. Franqueiro

Firstly, requiring ClientFilter isn't exactly a workaround, or at least not one without consequences, since it fundamentally alters some of the store's behavior.

I'm wondering if something's dying a horrible death related to how the build script builds the xd version of this file. Here's a few lines from JsonQueryRestStore.xd.js, beautified:

depends: [
    ["provide", "dojox.data.JsonQueryRestStore"],
    ["require", "dojox.data.JsonRestStore"],
    ["require", "dojox.data.util.JsonQuery"],
    ["requireIf", !! _3.data.ClientFilter, "dojox.json.query"]
],

Notice the _3 above... that should actually be dojox under normal circumstances (and is in fact still intact in the non-xd version of the file). This causes a "_3.data is undefined" error which is causing the load failure.

comment:3 Changed 7 years ago by bill

Milestone: tbd1.8
Resolution: fixed
Status: newclosed

The require is there in 1.8, so fixed for 1.8 or perhaps earlier.

Note: See TracTickets for help on using tickets.