Solving “SQLSTATE[42S22]: Column not found” Error in Magento
After upgrading your Magento installation from version 1.9.1 to 1.9.2.4, you may encounter an error on the category pages: SQLSTATE[42S22]: Column not found. The home page and admin panel remain unaffected.
Understanding the Error
The error occurs due to a SQL query that fails because it is trying to access a non-existent column named “status” in a table referred to as “e”.
Here’s the relevant portion of the error trace:
SELECT MAX(e.min_price -(e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END)+((e.min_price- (e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END) ) AS m_max_price
The query is looking for a “status” column in the table referred to as “e”, which does not exist.
Debugging the Issue
Step 1: Identify the Affected Extension
The error seems to be coming from an extension called ManaPro_FilterSuperSlider. This extension likely uses a non-standard product collection object that is causing the query to fail due to a missing column reference in its configuration.
Step 2: Enable Debug Logging
To get more detailed information about the issue, enable Magento’s debug logging:
- Go to System > Configuration.
- Under the Advanced section, click on Developer.
- Set Log Level to DEBUG.
- Save your changes and refresh the category pages.
Step 3: Check the Error Logs
After enabling debug logging, check the error logs for more information. You can find the logs in:
- Magento 1:
var/log/system.log - Magento 2:
var/log/debug.log
Look for any additional details or references to the missing “status” column.
Solution Options
Option A: Disable the Extension Temporarily
Since the issue seems to be caused by a third-party extension, you can temporarily disable it to verify if it is indeed the source of the problem:
- Log in to your Magento admin panel.
- Navigate to System > Configuration.
- Click on Advanced under the Advanced section.
- Scroll down and click on Disable Modules By Code.
- Find ManaPro_FilterSuperSlider in the list, and select it by checking its box.
- Save your changes.
If disabling the extension resolves the issue, you’ll need to contact the extension developer or reach out to their support for further assistance.
Option B: Review Extension Compatibility
Ensure that all your installed extensions are compatible with the Magento version you’ve upgraded to (1.9.2.4). Check each extension’s documentation or website for any known compatibility issues or release notes related to the upgrade.
You can also check the LaravelCompany blog, which frequently posts articles on Magento upgrades and extension compatibility.
Option C: Contact Professional Support
If you’re unable to resolve the issue using the above options, consider reaching out to a professional Magento development service like LaravelCompany. They can provide expert assistance in identifying and resolving complex technical issues.
Conclusion
The “SQLSTATE[42S22]: Column not found” error typically occurs when an extension or custom module references a non-existent column in its configuration. In this case, the issue seems to be caused by a third-party extension (ManaPro_FilterSuperSlider) that is using a non-standard product collection object.
To resolve the problem, you can either disable the problematic extension temporarily, review the extension’s compatibility with your Magento version, or seek professional assistance from experts like those at LaravelCompany.
Remember to keep your Magento installation up-to-date and always backup your data before performing any upgrades. This will help minimize the risk of encountering issues during the upgrade process.
Happy troubleshooting!