Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento’s strange behaviour
 
danilodimoia
Member
 
Total Posts:  36
Joined:  2008-04-21
Chieti
 

Hi, don’t know why magento crashed in a random way. It worked perfectly before this crash. Error reported at the end of email ("’modelli" is my custom attribute). Sometime it was Mage_Catalog_Block_Product_View,sometimes other file… anyway, looking for a solution, I’ve tried to add addAttribute method in class file. This method (copied from another file):

public function addAttribute($collection{
        $this
->_productCollection $collection;
        return 
$this;
}
makes Magento restarts to works correctly! Someone can explain why? Is it a known bug? Don’t you think it’s a strange behavoiur?

Error reported. Mage_Core_Block_Text_List can change in Mage_Core_Block_$whatever

Invalid method Mage_Core_Block_Text_List::addAttribute(Array
(
    
[0] => modelli  /** <-- it's my custom attribute  **/
)
)
Trace:
#0 [internal function]: Varien_Object->__call('addAttribute', Array)
#1 [internal function]: Mage_Core_Block_Text_List->addAttribute('modelli')
#2 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(319): call_user_func_array(Array, Array)
#3 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(195): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(191): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(278): Mage_Core_Model_Layout->generateBlocks()
#6 /var/www/magento/app/code/core/Mage/Catalog/controllers/ProductController.php(88): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#7 /var/www/magento/app/code/core/Mage/Catalog/controllers/ProductController.php(112): Mage_Catalog_ProductController->_initProductLayout(Object(Mage_Catalog_Model_Product))
#8 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(342): Mage_Catalog_ProductController->viewAction()
#9 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(159): Mage_Core_Controller_Varien_Action->dispatch('view')
#10 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(146): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /var/www/magento/app/Mage.php(427): Mage_Core_Controller_Varien_Front->dispatch()
#12 /var/www/magento/index.php(40): Mage::run('default')
#13 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Olof
Sr. Member
 
Total Posts:  152
Joined:  2008-10-17
 

I’ve just randomly started to receive the same error on the compare product page…

Any idea whats causing this?

Which class file did you add this to?

Rich

 
Magento Community Magento Community
Magento Community
Magento Community
 
Olof
Sr. Member
 
Total Posts:  152
Joined:  2008-10-17
 

This is what I am getting:

Invalid method Mage_Core_Block_Text_List::addAttribute(Array
(
    
[0] => manufacturer
)
)
Trace:
#0 [internal function]: Varien_Object->__call('addAttribute', Array)
#1 [internal function]: Mage_Core_Block_Text_List->addAttribute('manufacturer')
#2 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Core/Model/Layout.php(338): call_user_func_array(Array, Array)
#3 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Core/Model/Layout.php(200): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(303): Mage_Core_Model_Layout->generateBlocks()
#6 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(231): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#7 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Catalog/controllers/Product/CompareController.php(61): Mage_Core_Controller_Varien_Action->loadLayout()
#8 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Catalog_Product_CompareController->indexAction()
#9 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch('index')
#10 /var/sites/o/onesecurity.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /var/sites/o/onesecurity.co.uk/public_html/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#12 /var/sites/o/onesecurity.co.uk/public_html/index.php(65): Mage::run()
#13 {main}

It is when trying to compare products… Not sure what we have done to cause this…

 
Magento Community Magento Community
Magento Community
Magento Community
 
fastiman
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2013-03-02
 

I have the same problem while searching. Need some help

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top