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'

落爺英雄遲暮 提交于 2019-12-03 22:59:48

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.

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.

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

And make sure you disabled caching before start upgrade.

tgrafixx

For me, the problem was Redis cache. If you aren't sure if you have Redis enabled, check your app/etc/local.xml file.

To flush Redis cache:

redis-cli flushall 

That worked for me.

Make sure the table exists.

Check this table (sales_bestsellers_aggregated_yearly) wheater 'product_type_id' columns is in it. If 'product_type_id' column is in table then re-index and refresh cache. If 'product_type_id' column is not in that table then you need to create the structure like the image attached.

Today I have also faced the same issue and I have resolved by following steps:

  1. Run the below query in database

    ALTER TABLE sales_bestsellers_aggregated_yearly ADD product_type_id TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER product_id ;

    ALTER TABLE catalog_product_entity_group_price ADD is_percent SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Is Percent';

  2. Delete the contents of var/cache/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!