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.

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

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大