1

So I updated my site to 1.6 version of Magento and then I backtracked back to 1.5. My site has a bunch of Url rewrites but now they seem not to be working and will take me to an a cannot be found page. Can anyone help?

Getting this in terminal now after doing what was suggested below and trying to reindex.

php shell/indexer.php --reindex all
Product Attributes index was rebuilt successfully
Product Prices index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date' in 'field list'' in /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(1544): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#6 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(1494): Varien_Db_Adapter_Pdo_Mysql->insertArray('catalog_product...', Array, Array)
#7 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php(530): Varien_Db_Adapter_Pdo_Mysql->insertMultiple('catalog_product...', Array)
#8 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php(371): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price->_prepareWebsiteDateTable()
#9 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Indexer/Abstract.php(125): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price->reindexAll()
#10 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(139): Mage_Index_Model_Indexer_Abstract->reindexAll()
#11 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#12 /opt/bitnami/apache2/htdocs/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#13 /opt/bitnami/apache2/htdocs/shell/indexer.php(198): Mage_Shell_Compiler->run()
#14 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date' in 'field list'' in /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#3 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#4 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(1544): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#5 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(1494): Varien_Db_Adapter_Pdo_Mysql->insertArray('catalog_product...', Array, Array)
#6 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php(530): Varien_Db_Adapter_Pdo_Mysql->insertMultiple('catalog_product...', Array)
#7 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php(371): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price->_prepareWebsiteDateTable()
#8 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Indexer/Abstract.php(125): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price->reindexAll()
#9 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(139): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#11 /opt/bitnami/apache2/htdocs/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#12 /opt/bitnami/apache2/htdocs/shell/indexer.php(198): Mage_Shell_Compiler->run()
#13 {main}
Catalog URL Rewrites index was rebuilt successfully
Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'' in /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#4 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#5 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(652): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#6 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(122): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->prepareFlatTable('1')
#7 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(115): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild('1')
#8 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(64): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild(NULL)
#9 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(301): Mage_Catalog_Model_Product_Flat_Indexer->rebuild()
#10 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#11 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#12 /opt/bitnami/apache2/htdocs/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#13 /opt/bitnami/apache2/htdocs/shell/indexer.php(198): Mage_Shell_Compiler->run()
#14 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'' in /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#3 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#4 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(652): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#5 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(122): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->prepareFlatTable('1')
#6 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(115): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild('1')
#7 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(64): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild(NULL)
#8 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(301): Mage_Catalog_Model_Product_Flat_Indexer->rebuild()
#9 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#10 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#11 /opt/bitnami/apache2/htdocs/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#12 /opt/bitnami/apache2/htdocs/shell/indexer.php(198): Mage_Shell_Compiler->run()
#13 {main}
Category Flat Data index process unknown error:
exception 'PDOException' 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 '
`updated_at` ,
`path` varchar(255) not null,
`position` int(11) not null defaul' at line 4' in /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('CREATE TABLE `c...', Array)
#4 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('CREATE TABLE `c...', Array)
#5 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(526): Varien_Db_Adapter_Pdo_Mysql->query('CREATE TABLE `c...')
#6 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(433): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat->_createTable('1')
#7 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(237): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat->rebuild()
#8 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Category_Indexer_Flat->reindexAll()
#9 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#10 /opt/bitnami/apache2/htdocs/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#11 /opt/bitnami/apache2/htdocs/shell/indexer.php(198): Mage_Shell_Compiler->run()
#12 {main}

Next exception 'Zend_Db_Statement_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 '
`updated_at` ,
`path` varchar(255) not null,
`position` int(11) not null defaul' at line 4' in /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /opt/bitnami/apache2/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('CREATE TABLE `c...', Array)
#3 /opt/bitnami/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('CREATE TABLE `c...', Array)
#4 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(526): Varien_Db_Adapter_Pdo_Mysql->query('CREATE TABLE `c...')
#5 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(433): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat->_createTable('1')
#6 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(237): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat->rebuild()
#7 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Category_Indexer_Flat->reindexAll()
#8 /opt/bitnami/apache2/htdocs/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#9 /opt/bitnami/apache2/htdocs/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#10 /opt/bitnami/apache2/htdocs/shell/indexer.php(198): Mage_Shell_Compiler->run()
#11 {main}
Category Products index was rebuilt successfully
Catalog Search Index index was rebuilt successfully
Stock Status index was rebuilt successfully
Tag Aggregation Data index was rebuilt successfully
1

If you have access to your MySQL or phpMyAdmin, you can truncate the table called core_url_rewrite. After that you can start running a new index for url rewrites.

You can run this SQL query in phpMyAdmin(remember to select your database):

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `core_url_rewrite`;
SET FOREIGN_KEY_CHECKS = 1;

After you have truncated the table you can index via Magento backend or

do it in Terminal / SSH with this code from the Magento root folder:

php shell/indexer.php --reindex catalog_url
  • Hey thanks for the reply but that did not work. – DevAnd Mar 12 '18 at 15:39
  • Actually updated my question, tried to reindex and got these errors above. – DevAnd Mar 12 '18 at 15:53
  • Maybe you should just replace the files with the originals? – Chris Gudn Mar 12 '18 at 23:14

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.