1

I have a strange problem in Magento 1.7.0.2. When I try to open the items in the catalog I get the following error in my logging. I have been tinkering around with the catalog.xml but even after reverting the changes with a backup it still won't work correctly.

It seems to be that the exception has to do with the Relatedslider from the theme. However this has worked correctly before. I have no clue where to look at the moment. Can someone point me in the right direction? Thanks!

2013-10-09T09:29:15+00:00 ERR (3): 
exception 'Mage_Core_Exception' with message 'Ongeldig bloktype:     Magentothem_Relatedslider_Block_Page_Html_Head' in     /home/public_html/domain.nl/app/Mage.php:594
Stack trace:
#0 /home/public_html/domain.nl/includes/src/__default.php(27333):     Mage::throwException('Ongeldig blokty...')
#1 /home/public_html/domain.nl/includes/src/__default.php(27275):      Mage_Core_Model_Layout->_getBlockInstance('relatedslider/p...', Array)
#2 /home/public_html/domain.nl/includes/src/__default.php(27310):      Mage_Core_Model_Layout->createBlock('relatedslider/p...', 'magentothem_rel...')
#3 /home/public_html/domain.nl/includes/src/__default.php(27077):     Mage_Core_Model_Layout->addBlock('relatedslider/p...', 'magentothem_rel...')
#4 /home/public_html/domain.nl/includes/src/__default.php(27043):     Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element),     Object(Mage_Core_Model_Layout_Element))
#5 /home/public_html/domain.nl/includes/src/__default.php(27048):     Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home/public_html/domain.nl/includes/src/__default.php(13507):     Mage_Core_Model_Layout->generateBlocks()
#7 /home/public_html/domain.nl/includes/src/__default.php(10889):     Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home/public_html/domain.nl/includes/src/__default.php(10828): Mage_Cms_Helper_Page-    >_renderPage(Object(Mage_Cms_IndexController), 'no-route')
#9 /home/public_html/domain.nl/app/code/core/Mage/Cms/controllers/IndexController.php(75):     Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'no-route')
#10 /home/public_html/domain.nl/includes/src/__default.php(13582):     Mage_Cms_IndexController->noRouteAction()
#11 /home/public_html/domain.nl/includes/src/__default.php(17927):     Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#12 /home/public_html/domain.nl/includes/src/__default.php(17484):     Mage_Core_Controller_Varien_Router_Standard-    >match(Object(Mage_Core_Controller_Request_Http))
#13 /home/public_html/domain.nl/includes/src/__default.php(20061):     Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/public_html/domain.nl/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#15 /home/public_html/domain.nl/index.php(87): Mage::run('', 'store')
#16 {main} 

Edit>> After disabling the compiler, as suggested below it still does not work. But I have enabled error displaying in the browser. From this the following error is now present:

Trace:
#0 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Source model "m...')
#1 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
#2 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php(70): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)
#3 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(144): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes->_prepareForm()
#4 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Block/Abstract.php(862): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#5 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
#6 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#7 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#8 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#9 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#10 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#11 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#12 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#13 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#14 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#15 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(250): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#16 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_Catalog_ProductController->editAction()
#17 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/gitaar1b/public_html/domain.nl/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/gitaar1b/public_html/domain.nl/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#21 /home/gitaar1b/public_html/domain.nl/index.php(87): Mage::run('', 'store') 
#22 {main}

I still am not sure how to fix this, as I cannot find anything relevant on the subject.

  • Clear the cache thru admin, give your catalog.xml and Magentothem_Relatedslider module structure, config.xml – mageUz Oct 14 '13 at 18:40
  • Clear compilation, and disable it till you get correct performance – Petar Dzhambazov Oct 14 '13 at 18:53
2

If you take a look at your error call stack

#0 /home/public_html/domain.nl/includes/src/__default.php(27333):     Mage::throwException('Ongeldig blokty...')
#1 /home/public_html/domain.nl/includes/src/__default.php(27275):      Mage_Core_Model_Layout->_getBlockInstance('relatedslider/p...', Array)
#2 /home/public_html/domain.nl/includes/src/__default.php(27310):      Mage_Core_Model_Layout->createBlock('relatedslider/p...', 'magentothem_rel...')
#3 /home/public_html/domain.nl/includes/src/__default.php(27077):   

most of the files involved come from the includes/src/__default.php file. Magento only uses this file when it's running in "compiler" mode. Compiler mode is when Magento looks at all the module class files in app/code/*/*, and then makes a copy of those files in includes/src — it also combines many base classes in a single file, __default.php. This is done to increase performance in production systems.

So, step one would be to disable compiler mode, see if the error has gone away, and then re-compile your classes to catch whatever class was missed in the initial compilation. You can do this at

System -> Tools -> Compilation

Or via the shell script

$ php shell/compiler.php

If the problem does not go away when compilation mode is disabled, it looks like Magento is trying to instante a block (perhaps embedded in a CMS page) that doesn't exist.

Mage_Core_Model_Layout->createBlock('relatedslider/p...', 'magentothem_rel...')

Unfortunately, this block's full class alias (relatedslider/p...) is omitted. Figuring out the full block alias, and why Magento can't instantiate it (missing class, mistyped alias, etc.) will lead you to a solution for your problem.

  • I have disabled the compiling, as you mentioned. Thereafter I enabled error displaying and have the error message as displayed in the edited post above. Thanks for the help so far! – Hugo Oct 15 '13 at 9:09
2

I found the solution to this problem! It was related to an early try to install Yoast SEO plugin. The plugin did not work correctly and I (thought) removed it some weeks ago. All worked well, but did not check the catalog page. After some time this problem pops up, but was related to that earlier install of Yoast.

The solution is to execute these lines in the phpMyAdmin:

DELETE FROM `core_resource` WHERE `core_resource`.`code` = 'metarobots_setup';
DELETE FROM `eav_attribute` WHERE `eav_attribute`.`attribute_code` = 'meta_robots';
update eav_entity_type set additional_attribute_table='catalog/eav_attribute',entity_attribute_collection='catalog/product_attribute_collection' where entity_type_id=4;

After that clear the cache and all should work again. Thanks for the pointers!

1

is a error from Magentotheam

Move app/code/local/Magentothem/Relatedslider/Block/Block/Page/Html/Head.php

to

app/code/local/Magentothem/Relatedslider/Block/Page/Html/Head.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.