ZF-7331: dojo is not work when i use it in one action not the defualt indexAction() , the error: the dojo.js is nto defined!

Description

dojo is not work when i use it in one action not the defualt indexAction() , the error: the dojo.js is nto defined!

Comments

Right now, there is simply not enough information to diagnose the issue.

Are you calling setLocalPath()? If so, have you actually added Dojo to your document_root?

If you are using Dojo via the CDN, what version of Dojo are you specifying? and which CDN? and do you have internet connectivity when you test?

first step, I make a dir named "js" in the public directory, I copy the dojo library in the dir "js" second step, in the Bootstrap.php protected function _initDoctype() { $this->bootstrap('view'); $view = $this->getResource('view'); $view->doctype('XHTML1_TRANSITIONAL'); $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper'); }

3th step, in the layout.phtml

<?php if ($this->dojo()->isEnabled()){ $this->dojo()->setLocalPath('js/dojo/dojo.js') ->addStyleSheetModule('dijit.themes.tundra'); echo $this->dojo(); } ?>

forth step, A controler named UserControler.php , there is a loginAction() ,in the login.phtml view file,

<?php $this->dojo()->enable() ->setDjConfigOption('parseOnLoad', true) ->setDjConfigOption('isDebug', true) ->requireModule('dojo.io.script'); ?> if i request , http://127.0.0.1/user/login , the problem will come , " dojo.js is not defined!"

why?

Have you tried adding a / to your dojo path?


$this->dojo->setLocalPath('/js/dojo/dojo.js');

Reporter has not responded to last question in > 3 months.