Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column not found: 1054 Unknown column 'mailchimp_sync' in 'order clause' #1981

Closed
diazwatson opened this issue Jul 19, 2024 · 0 comments · Fixed by #1991, #1992, #1993 or #1994
Closed

Column not found: 1054 Unknown column 'mailchimp_sync' in 'order clause' #1981

diazwatson opened this issue Jul 19, 2024 · 0 comments · Fixed by #1991, #1992, #1993 or #1994

Comments

@diazwatson
Copy link

Issue Description

When admin user goes to the Customer and filter results by Mailchimp column, the message appears:
image2

At the same time in the system.log we can see these exceptions:

Next Zend_Db_Statement_Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mailchimp_sync' in 'order clause', query was: SELECT `main_table`.*, IFNULL(`rnt`.`name`, IFNULL(`rct`.`default_name`, `main_table`.`billing_region`)) AS `billing_region`, `amrewards`.`points_left` AS `amount` FROM `customer_grid_flat` AS `main_table`
 LEFT JOIN `directory_country_region` AS `rct` ON rct.region_id=`main_table`.`billing_region_id`
 LEFT JOIN `directory_country_region_name` AS `rnt` ON rnt.region_id=`main_table`.`billing_region_id` AND rnt.locale='en_GB'
 LEFT JOIN `amasty_rewards_rewards` AS `amrewards` ON main_table.entity_id = amrewards.customer_id AND amrewards.id IN (SELECT MAX(id) FROM amasty_rewards_rewards GROUP BY customer_id) ORDER BY mailchimp_sync ASC
 LIMIT 200 OFFSET 400 in /home/magento/releases/151/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:109
[2024-07-19T10:48:47.247084+00:00] main.CRITICAL: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mailchimp_sync' in 'order clause' in /home/magento/releases/151/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:90

Preconditions

  • Magento Community: 2.4.5-p5
  • mailchimp/mc-magento2: 103.4.62

Steps to reproduce

1. Log into the admin panel and navigate to Customers -> All Customers
2. Clic on Mailchimp column

Screenshot 2024-07-19 at 14 37 02

Actual and Expected result

Expected result:

Customer grid results reorder based on Mailchip values

Actual result:

An error message is shown

gonzaloebiz added a commit that referenced this issue Aug 30, 2024
gonzaloebiz added a commit that referenced this issue Aug 30, 2024
gonzaloebiz added a commit that referenced this issue Aug 30, 2024
@gonzaloebiz gonzaloebiz self-assigned this Aug 30, 2024
@gonzaloebiz gonzaloebiz added this to the 10x.x.63 milestone Aug 30, 2024
gonzaloebiz added a commit that referenced this issue Aug 30, 2024
gonzaloebiz added a commit that referenced this issue Aug 30, 2024
gonzaloebiz added a commit that referenced this issue Aug 30, 2024
gonzaloebiz added a commit that referenced this issue Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment