Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6700 closed defect (worksforme)

dojo.require problems in firefox

Reported by: guest Owned by: anonymous
Priority: high Milestone: 1.2
Component: General Version: 1.1.0
Keywords: Cc:
Blocked By: Blocking:

Description

Using dojo.require in firefox 2.0.0.14 does not work on a specific page, which does load fine in IE6.

The error is that the js is being loaded from an invalid path: "<current-path>undefined./parser.js" while in my config, the correct path for parser.js is

"/js/dojo-release-1.1.0/dojo/parser.js"

It's not related to the load of any specific file.

The dojo files which are being loaded from the main dojo script tag work fine.

Error message is:

Could not load 'dojo.parser'; last tried './parser.js' /js/dojo-release-1.1.0/dojo/dojo.js Line 20

Attaching an excerpt of the page which has these problems. I am mixing MochiKit? with dojo, and also noticed that the MochiKit? script tag needs to be placed after the dojo script tag, for MochiKit? functions to be correctly defined.

Attachments (1)

dojo-require-bug.html (2.6 KB) - added by guest 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by guest

In FF3beta5 this bug does not occur either.

Changed 11 years ago by guest

Attachment: dojo-require-bug.html added

comment:2 Changed 11 years ago by James Burke

Seems odd. If you set djConfig.baseUrl = '/backoffice/js/dojo-release-1.1.0/' (as part of the djConfig attribute for the dojo.js script tag), does that solve the issue for Firefox 2?

comment:3 in reply to:  2 Changed 11 years ago by guest

Replying to jburke:

Seems odd. If you set djConfig.baseUrl = '/backoffice/js/dojo-release-1.1.0/' (as part of the djConfig attribute for the dojo.js script tag), does that solve the issue for Firefox 2?

Slightly. I was wrong about FF3Beta5 not having problems. It does *sometimes*. Setting djConfig: baseUrl: '/backoffice/js/dojo-release-1.1.0/dojo/' made the error go away in FF3Beta5. (Note added 'dojo' at the end compared to your suggestion). But not in FF2.

alert(dojo.baseUrl) just before dojo.require() gave undefined in FF2, but correct in other browsers. dojo.baseUrl = ...; just before dojo.require() did the trick. Thanks!

comment:4 Changed 11 years ago by James Burke

Resolution: worksforme
Status: newclosed

Given the last comment, this seems to be working now.

comment:5 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.