Hi Matthew,

Sorry for my late reply, I am under a lot of pressure for a deadline.

You fixed it! :-) And a few other things along the way.

First result of the update was an error, due to some corrected (!) behavior:
*Fatal error*: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'File CmsScripts.php was loaded but class named Admin_View_Helper_CmsScripts was not found within it.' in D:\ZendFramework\library\Zend\Loader\PluginLoader.php:351 Stack trace: #0 D:\ZendFramework\library\Zend\View\Abstract.php(1114): Zend_Loader_PluginLoader->load('CmsScripts') #1 D:\ZendFramework\library\Zend\View\Abstract.php(545): Zend_View_Abstract->_getPlugin('helper', 'cmsScripts') #2 D:\ZendFramework\library\Zend\View\Abstract.php(312): Zend_View_Abstract->getHelper('cmsScripts') #3 [internal function]: Zend_View_Abstract->__call('cmsScripts', Array) #4 D:\werkmap\www.mrvane.com zf\application\admin\controllers\ItemsController.php(20): Zend_View->cmsScripts() #5 D:\ZendFramework\library\Zend\Controller\Action.php(129): Admin_ItemsController->init() #6 D:\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php(269): Zend_Controller_Action->__construct(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http), A in *D:\ZendFramework\library\Zend\Loader\PluginLoader.php* on line *351

*But I know how to fix this one!, I named it Zend_View_Helper_etc., so just have to rename to Admin_View_Helper...and a few others too

Bart McLeod

Matthew Weier O'Phinney schreef:
-- Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote
(on Monday, 14 July 2008, 08:54 AM -0400):
-- Bart McLeod <[EMAIL PROTECTED]> wrote
(on Monday, 14 July 2008, 02:07 PM +0200):
another addition:
The problem is in the new getDecorator function. If you call it, it 'lazyloads' the decorator, but puts it at the end of the stack. See this output, where I var_dumped the decorators inside the lazy load function, before and after getting the decorator 'td': In the first array of 7 decorators, td is between errors and tr, where it should be. In the second array, it comes after table, effectively breaking the rendering chain.
Ah, okay -- I see what's happening, and it's a use case which didn't
have a test. I'll work on correcting it in the next 1-2 days.

As an explanationg, a little over a week ago, I refactored Zend_Form,
Zend_Form_DisplayGroup, and Zend_Form_Element to use lazy loading. This
was done for two reasons: a) to reduce overhead when plugins of a
certain type are never invoked, and b) to make it easier to set plugin
prefix paths at any given point in time, and have them affect previously
set plugins. (b) was partly to address Dojo and other JS library
integration.

Obviously, this has evidently created an issue of ordering plugins when
an individual plugin is fetched before others have been instantiated.
I'll write a test for this use case so that I can correct it in the next
couple of days so that it can get into the 1.6 release.

I've written tests to cover this situation, and updated the code to
ensure that plugin order is retained during lazy loading. Please test
and confirm!

Reply via email to