ZF-5929: Zend_Dojo_View_Helper_Dojo_Container::registerDijitLoader when parseOnLoad is true

Issue Type: Bug Created: 2009-03-03T03:57:38.000+0000 Last Updated: 2011-10-30T15:38:29.000+0000 Status: Open Fix version(s): Reporter: Elvin ?iriyev (elvinsh) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Dojo

Related issues: - ZF-6563

Attachments: - Container.php


Zend_Dojo generates an extra dojo.parser.parse() call which breaks dijits.

This happens when you have enabled parseOnLoad in djConfig, and use dijit based form elements.

Steps: - Enable parseOnLoad in Zend_Dojo - Add a form with dijits

Result: - The dojo view helper generates a script which runs dojo.parser.parse() in the end, which makes dojo parse the dijits in the document twice, breaking them.

Expected: - If parseOnLoad is enabled, the line running dojo.parser.parse() should never be generated.


Posted by Jani Hartikainen (jhartikainen) on 2010-12-13T04:23:08.000+0000

Cleaned up the description

Posted by Emanuele Deserti (lord_lele) on 2011-10-18T10:43:15.000+0000

I have resolved patching Zend/Dojo/View/Helper/Dojo/Container.php

In line 871 add this:

        if ($this->getDjConfigOption('parseOnLoad') === false) {

            $js =<<<EOJ

function() { dojo.forEach(zendDijits, function(info) { var n = dojo.byId(; if (null != n) { dojo.attr(n, dojo.mixin({ id: }, info.params)); } }); } EOJ;


Not elegant, but it's working...

Posted by Emanuele Deserti (lord_lele) on 2011-10-18T10:46:54.000+0000

Here's the patched file.

Posted by Sammie S. Taunton (diemuzi) on 2011-10-30T15:38:29.000+0000

Thank you, I thought I was doing something completely off the wall until I found this =)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.