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?