Ticket #6700 (closed defect: worksforme)

Opened 3 months ago

Last modified 19 hours ago

dojo.require problems in firefox

Reported by: guest Owned by: anonymous
Priority: normal Milestone: 1.2
Component: General Version: 1.1.0
Severity: major Keywords:
Cc:

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

dojo-require-bug.html (2.6 kB) - added by guest 3 months ago.

Change History

  Changed 3 months ago by guest

In FF3beta5 this bug does not occur either.

Changed 3 months ago by guest

follow-up: ↓ 3   Changed 3 months ago by 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?

in reply to: ↑ 2   Changed 2 months 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!

  Changed 3 weeks ago by jburke

  • status changed from new to closed
  • resolution set to worksforme

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

  Changed 19 hours ago by bill

  • milestone set to 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.