revolution14 revolution14 - 3 months ago 10
MySQL Question

Magento Url ReWrite Management Error ver. 1.6.2.0

I am currently working on a Magento store (ver. 1.6.2.0) however when i click on the url re-write management i get a Magento error page, below is the information from the Magento error log.

So far i have tried the following


  1. Restoring the Mage.php file

  2. Restoring index.php

  3. Refreshing indexes and clearing cache

  4. Deleting all data in catalog_url_rewrite table and reindexing



2012-01-23T17:16:21+00:00 ERR (3):
exception 'Mage_Eav_Model_Entity_Attribute_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1' in /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Core/Model/Config.php:1350
Stack trace:
#0 /var/www/vhosts/www.domain.co.uk/httpdocs/app/Mage.php(432): Mage_Core_Model_Config->getModelInstance('eav/entity_attr...', 'SQLSTATE[42000]...')
#1 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Eav/Model/Entity/Abstract.php(661): Mage::getModel('eav/entity_attr...', 'SQLSTATE[42000]...')
#2 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1624): Mage_Eav_Model_Entity_Abstract->walkAttributes('backend/afterLo...', Array)
#3 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Eav/Model/Entity/Abstract.php(964): Mage_Eav_Model_Entity_Abstract->_afterLoad(Object(Mage_Catalog_Model_Product))
#4 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Catalog/Model/Resource/Abstract.php(698): Mage_Eav_Model_Entity_Abstract->load(Object(Mage_Catalog_Model_Product), 213, NULL)
#5 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Core/Model/Abstract.php(225): Mage_Catalog_Model_Resource_Abstract->load(Object(Mage_Catalog_Model_Product), 213, NULL)
#6 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Catalog/Helper/Product.php(294): Mage_Core_Model_Abstract->load(213)
#7 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Catalog/Helper/Product/View.php(121): Mage_Catalog_Helper_Product->initProduct(213, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#8 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(213, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#9 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Catalog_ProductController->viewAction()
#10 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#11 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/community/ArtsOnIT/OfflineMaintenance/Controller/Router/Standard.php(46): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): ArtsOnIT_OfflineMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /var/www/vhosts/www.domain.co.uk/httpdocs/app/code/local/Mage/Core/Model/App.php(348): Mage_Core_Controller_Varien_Front->dispatch()
#14 /var/www/vhosts/www.domain.co.uk/httpdocs/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#15 /var/www/vhosts/www.domain.co.uk/httpdocs/index.php(80): Mage::run('base', 'website')
#16 {main}


I would be grateful if someone could help me figure this out!

Thanks in advance

Answer

It turns out the error was being thrown at the walkAttributes('backend/afterLo...', Array) stage. I did an email each time it went to the function and it turned out an old plugin that needed updating installed an attribute as the system. So it was looking for a model that didn't exist.