duanrang9348 2010-07-12 20:46
浏览 37
已采纳

Zend Dojo在重复数字中添加了两次结果

This has been working fine, not sure why it's stopped all of a sudden.. Basically I am getting the error:

Notice: Duplicate dijit ID detected for id "email; temporarily generating uniqid" in ..\Zend\Dojo\Form\Decorator\DijitElement.php on line 171

If I look at the page source, my JS for dojo has been added twice:

var zendDijits = [{"id":"email","params":{"required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"password","params":{"required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"submit","params":{"required":"false","dojoType":"dijit.form.Button"}},{"id":"email-4c3b7d9205842","params":{"required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"password-4c3b7d9206311","params":{"required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"submit-4c3b7d9206be5","params":{"required":"false","dojoType":"dijit.form.Button"}},{"id":null,"params":{"dojoType":"dijit.form.Form"}}];

Form items are only shown once on the page, what could be causing Zend to think there are more than one of them?

Backtrace:

Notice: Duplicate dijit ID detected for id "email; temporarily generating uniqid" in ...\Zend\Dojo\Form\Decorator\DijitElement.php on line 171
Call Stack
#   Time    Memory  Function    Location
1   0.0009  370424  {main}( )   ..\index.php:0
2   0.2124  8373704 Zend_Application->run( )    ..\index.php:10
3   0.2124  8373704 Zend_Application_Bootstrap_Bootstrap->run( )    ..\Application.php:366
4   0.2125  8373760 Zend_Controller_Front->dispatch( )  ..\Bootstrap.php:97
5   0.2233  8739920 Zend_Controller_Dispatcher_Standard->dispatch( )    ..\Front.php:954
6   0.2467  9807848 Zend_Controller_Action->dispatch( ) ..\Standard.php:295
7   0.3161  12648736    Zend_Controller_Action_HelperBroker->notifyPostDispatch( )  ..\Action.php:523
8   0.3162  12649640    Zend_Controller_Action_Helper_ViewRenderer->postDispatch( ) ..\HelperBroker.php:277
9   0.3163  12649640    Zend_Controller_Action_Helper_ViewRenderer->render( )   ..\ViewRenderer.php:957
10  0.3169  12649808    Zend_Controller_Action_Helper_ViewRenderer->renderScript( ) ..\ViewRenderer.php:918
11  0.3170  12649808    Zend_View_Abstract->render( )   ..\ViewRenderer.php:897
12  0.3173  12690872    Zend_View->_run( )  ..\Abstract.php:880
13  0.3176  12692448    include( 'C:\wamp\www\cms\application\modules\default\views\auth\login.phtml' ) ..\View.php:108
14  0.3177  12692448    Zend_Form->__toString( )    ..\Form.php:0
15  0.3177  12692448    Zend_Form->render( )    ..\Form.php:2898
16  0.3178  12692528    Zend_Form_Decorator_FormElements->render( ) ..\Form.php:2882
17  0.3181  12692824    Zend_Form_Element->render( )    ..\FormElements.php:101
18  0.3181  12692904    Zend_Dojo_Form_Decorator_DijitElement->render( )    ..\Element.php:2016
19  0.3182  12693488    trigger_error ( )   ..\DijitElement.php:171
  • 写回答

1条回答 默认 最新

  • duanaoou4105 2010-07-13 11:19
    关注

    Turns out, that although the content wasn't getting rendered twice, the render() function in view was. Apparently this overwrites any previous render() calls to the layout content but not the content in the registry to be used by other elements of the framework.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料