Solving the Column Not Found Error After Upgrading Magento
Dear Magento user,
You’ve encountered an error after upgrading your website to version 1.9.3.0, which is causing problems with your product catalog. Let’s dive into solving this issue step-by-step.
Understanding the Error Message
The error message “SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘catalog_product_entity_group_price.is_percent’ in ‘field list’” indicates that the database query is looking for a non-existent column called is_percent in the catalog_product_entity_group_price table. This usually happens when your database schema didn’t properly upgrade or conflicts occurred during the update process.
Analyzing the Problem
The trace information shows that the error originates from the EAV (Entity-Attribute-Value) model, which is a core component of Magento’s product catalog handling. The query was trying to fetch price data for a specific product (entity_id=84), but it couldn’t find the expected column structure.
Recommended Solutions
Option 1: Repairing the Database Schema
To fix this issue, you can repair your database schema to ensure all tables are in sync with the current Magento version. Here’s how you can do it:
- Navigate to your Magento root directory via FTP or SSH.
- Locate the
binfolder and execute the following command:
php bin/magento setup:upgrade
This command will apply all necessary database schema changes based on the installed modules.
- If the above command doesn’t resolve the issue, try running the
setup:db-data-upgradecommand to upgrade data as well:
php bin/magento setup:db-data-upgrade
Option 2: Reinstalling the Affected Module
Since the error seems to be related to the EAV model and the catalog module, you might want to reinstall these modules:
-
Log in to your Magento admin panel.
-
Navigate to “System” > “Configuration”.
-
Find the “Advanced” section under “Magento Configuration”.
-
Click on “Enable Module Output”.
-
Search for the
catalogandeavmodules, then deselect them by clicking the checkbox next to each module name. -
Click “Save Config”.
-
Go back to your Magento root directory via FTP or SSH.
-
Navigate to the
app/code/core/Magefolder and delete both thecatalogandeavdirectories (backup them somewhere safe first). -
Reinstall the modules using composer:
composer require magento/eav
- And then:
composer require magento/catalog
- Finally, clear your cache and reindex all data:
php bin/magento cache:clean
php bin/magento indexer:reindex
Conclusion
Upgrading Magento can sometimes lead to unexpected issues due to database schema mismatches or conflicts between versions. However, by following the step-by-step guide above, you should be able to resolve this column not found error and get your website running smoothly again.
Remember that it’s always a good practice to backup your data before performing any major updates. If you’re unsure about handling database repairs yourself, consider reaching out to our professional Magento development services at Laravel Company for assistance.
Stay updated with the latest Magento news and tips by subscribing to our blog!