Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 981513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:33:13+00:00 2026-05-16T04:33:13+00:00

I have been using Dojo hosted on Google’s CDN. I just downloaded the development

  • 0

I have been using Dojo hosted on Google’s CDN. I just downloaded the development version so I can do some debugging. When using dojo stored locally, Firebug reports several syntax errors. They all look like this:

SyntaxError: syntax error
(no script)(""en-us"")bootstrap.js (line 601)
(no script)(""dojo.cldr"", ""number"")bootstrap.js (line 590)
(no script)(""dojo.cldr"", ""number"")loader.js (line 634)
(no script)(""./number.js"", ""dojo.number"")loader.js (line 76)
(no script)(""dojo.number"")loader.js (line 411)
(no script)(""./currency.js"", ""dojo.currency"")loader.js (line 76)
(no script)(""dojo.currency"")loader.js (line 411)
(no script)(""../dijit/form/CurrencyTextBox.js"", ""dijit.form.CurrencyTextBox"")loader.js (line 76)
(no script)(""dijit.form.CurrencyTextBox"")loader.js (line 411)
[Break on this error] (601 out of range 505)
bootstrap.js (line 601)

I know I have Dojo set up correctly throughout my layout, views, and controllers because dojo works fine if I use a CDN. I’ve also verified that the localpath resolves properly, which it does.

This is what the initialization looks like using CDN (this works correctly):

<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript();
if ($this->dojo()->isEnabled()) {
    $this->dojo()->setCdnVersion('1.5')
                 ->addStyleSheetModule('dijit.themes.claro');
    echo $this->dojo();
}
?>
</head>

And this is what it looks like using the local version:

<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript();
if ($this->dojo()->isEnabled()) {
    $this->dojo()->setLocalPath('/js/dojo/dojo.js')
                 ->addStyleSheetModule('dijit.themes.claro')
                 ->setDjConfigOption('parseOnLoad', true)
                 ->setDjConfigOption('isDebug', true);
    echo $this->dojo();
}
?>
</head>

What am I doing wrong with the localpath that is making these syntax errors occur?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:33:14+00:00Added an answer on May 16, 2026 at 4:33 am

    It appears that you have to “build” dojo when you download the source and want to run it locally. Somehow I missed this as a requirement of using a local path version of dojo. At any rate, I was finally able to get dojo to run correctly locally by doing a custom build. I found this dojo reference very helpful:

    http://docs.dojocampus.org/quickstart/custom-builds

    In the util/buildscripts folder in the dojo distribution, there are several predefined build profiles as well. I suspect that you could use one of these to build the whole dojo distribution, but I figured if I’m going to this much trouble, might as well get an optimized build out of it.

    My build profile ended up looking like this:

    dependencies ={
    
       layers:  [
           {
           name: "mydojo.js",
           dependencies: [
               "dojox.grid.DataGrid",
               "dojox.Data.QueryReadStore",
               "dijit.form.ComboBox",
               "dijit.form.ValidationTextBox",
               "dijit.form.CurrencyTextBox",
               "dijit.form.PasswordTextBox",
               "dijit.form.RadioButton",
               "dijit.form.Button",
               "dijit.form.CheckBox",
               "dijit.form.DateTextBox"
           ]
           }
       ],
    
       prefixes: [
           [ "dijit", "../dijit" ],
           [ "dojox", "../dojox" ]
       ]
    
     };
    

    I placed this in the /util/buildscripts/profiles folder, named “myProfile.profile.js”.

    Then, I ran the build script from /util/buildscripts:

    ./build.sh profile=myProfile action=release optimize=shrinksafe.keepLines layerOptimize=shrinksafe.keepLines releaseName=myRelease localeList=en-us,es-es version=0.1.dev
    

    Copy the resulting build from /release/myRelease to your website’s javascript folder, i.e. /js/myRelease/.

    The important commandline options are “profile” and “action”, the others are optional. You can get a full description of what each commandline option means at the url I provided above. I customized these options to my particular needs–yours may be very different and I have provided them only as an example of what mine looked like in the end. If you are on windows, instead of “build.sh”, use “build.bat”.

    Then, to set Zend to use this build, I did the following in my layout.phtml file:

    if ($this->dojo()->isEnabled()) {
            $this->dojo()->setLocalPath($this->baseUrl() . '/js/myRelease/dojo/dojo.js')
                 ->addStyleSheetModule('dijit.themes.claro')
                 ->setDjConfigOption('isDebug', true)
                 ->setDjConfigOption('debugAtAllCosts', true)
                 ->addLayer($this->baseUrl() . '/js/myRelease/dojo/mydojo.js')                
                 ;
    }
    

    Using “addLayer” for the custom build is what finally got this working for me. I hope this helps save someone else a little time!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using ASP.NET for years, but I can never remember when using
I have a set of items that can be dragged / dropped using Dojo
Have been using it for a while with CodeIgniter and I can't remember if
I have been using Selenium Webdriver successfully with JAR downloaded from their pages or
I have been using asp.net programming just from few months and I have to
We have been using CruiseControl for quite a while with NUnit and NAnt. For
I have been using PHP and JavaScript for building my dad's website. He wants
I have been using Eclipse as an IDE for a short amount of time
I have been using Castle MonoRail for the last two years, but in a
We have been using Scrum for around 9 months and it has largely been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.