Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Just upgrade my site to 1.9.3.0 and got error SQLSTATE[42S22]: Column not found: 1054 Unknown column 'catalog_product_entity_group_price.is_percent'

Before I was using Magento 1.9.2.4 and today I got message that need to upgrade my magento with latest update some critical updates too.

After upgrading my website from downloader section everything went well no error etc, two things happen that I notices after update my index.php permission was change to 666 website is opening correctly I mean front page display, but when I click on any product It show error page with following information.

There has been an error processing your request

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'catalog_product_entity_group_price.is_percent' in 'field list', query was: SELECT `catalog_product_entity_group_price`.`value_id` AS `price_id`, `catalog_product_entity_group_price`.`website_id`, `catalog_product_entity_group_price`.`all_groups`, `catalog_product_entity_group_price`.`customer_group_id` AS `cust_group`, `catalog_product_entity_group_price`.`value` AS `price`, `catalog_product_entity_group_price`.`is_percent` FROM `catalog_product_entity_group_price` WHERE (entity_id='84') AND (website_id = 0)

Trace:
    #0 /home/MyWebsite/public_html/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('eav/entity_attr...', 'SQLSTATE[42S22]...')

   #1 /home/MyWebsite/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(661): Mage::getModel('eav/entity_attr...', 'SQLSTATE[42S22]...')
   #2 /home/MyWebsite/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1641): Mage_Eav_Model_Entity_Abstract->walkAttributes('backend/afterLo...', Arr

Not know how to roll back because I did not get backup as they says it is stable, or not able to resolve this error.

Thanks in advance

like image 520
Naveed Avatar asked Oct 13 '16 05:10

Naveed


3 Answers

Delete the contents of var/cache/

For the future, remember to turn off Compiler, all Indexes, and all Caches prior to performing an update.

What happened, is that the configuration cache is still active, and prevents Magento from detecting that database changes are necessary.

like image 63
Ext3h Avatar answered Oct 15 '22 10:10

Ext3h


The issue is caused by a missing column named: is_percent in the table catalog_product_entity_group_price

Magento 1.9.3 includes an upgrade file that creates that column in the database. The file is located here: app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.19.1.4-1.6.0.0.19.1.5.php

When the cache is enabled the installer can’t run the upgrade script, causing the error reported by the OP. Another possible cause of a failed upgrade script is if you refresh the frontend or backend before all files have been uploaded via FTP.

If flushing the cache doesn’t solve the problem (be sure to refresh any external cache like Redis) you can try the following:

1) Open the core_resource table

2) Locate the catalog_setup row

3) If the current value for version and data_versions is: 1.6.0.0.19.1.5 then change both values to 1.6.0.0.19.1.2 and refresh any page of the frontend.

This will force Magento to rerun the upgrade script and create the missing column in the database.

If the value for version and data_version is 1.6.0.0.19.1.2 then you are not properly flushing the cache.

like image 17
Daniel Kratohvil Avatar answered Oct 15 '22 11:10

Daniel Kratohvil


Delete all files/folders from the folder path "var/cache/"

And make sure you disabled caching before start upgrade.

like image 3
naveenos Avatar answered Oct 15 '22 09:10

naveenos