Skip to content

Unknown column 'main_table.pickup_location' in 'order clause', #103

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

Closed
EmperorKonstantin opened this issue Aug 30, 2021 · 1 comment
Closed

Comments

@EmperorKonstantin
Copy link

EmperorKonstantin commented Aug 30, 2021

Can't view sales orders in admin with this error in exception.log:

Column not found: 1054 Unknown column 'main_table.pickup_location' in 'order clause',

Full error:

[2021-08-30 21:57:56] main.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.pickup_location' in 'order clause', query was: SELECT SUM(total_amount) AS `total`, SUM(subtotal_amount) AS `subtotal`, SUM(shipped_amount) AS `shipped`, SUM(tax_amount) AS `tax`, SUM(invoiced_amount) AS `invoiced`, SUM(discount_amount) AS `discount`, SUM(refunded_amount) AS `refunded` FROM (SELECT `main_table`.*, `shipper_order_join`.`carrier_group`, `shipper_order_join`.`delivery_date`, `shipper_order_join`.`dispatch_date`, `shipper_order_join`.`time_slot`, `shipper_order_join`.`pickup_location`, `shipper_order_join`.`carrier_type`, `sales_order`.`base_grand_total` AS `total_amount`, `sales_order`.`base_subtotal` AS `subtotal_amount`, `sales_order`.`base_total_invoiced` AS `invoiced_amount`, `sales_order`.`base_shipping_amount` AS `shipped_amount`, `sales_order`.`base_tax_amount` AS `tax_amount`, `sales_order`.`base_discount_amount` AS `discount_amount`, `sales_order`.`base_total_refunded` AS `refunded_amount` FROM `sales_order_grid` AS `main_table`
 LEFT JOIN `shipperhq_order_detail_grid` AS `shipper_order_join` ON main_table.entity_id = shipper_order_join.order_id
 LEFT JOIN `sales_order` ON main_table.entity_id = sales_order.entity_id GROUP BY `main_table`.`entity_id` ORDER BY main_table.pickup_location ASC
 LIMIT 20) AS `a` {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.pickup_location' in 'order clause', query was: SELECT SUM(total_amount) AS `total`, SUM(subtotal_amount) AS `subtotal`, SUM(shipped_amount) AS `shipped`, SUM(tax_amount) AS `tax`, SUM(invoiced_amount) AS `invoiced`, SUM(discount_amount) AS `discount`, SUM(refunded_amount) AS `refunded` FROM (SELECT `main_table`.*, `shipper_order_join`.`carrier_group`, `shipper_order_join`.`delivery_date`, `shipper_order_join`.`dispatch_date`, `shipper_order_join`.`time_slot`, `shipper_order_join`.`pickup_location`, `shipper_order_join`.`carrier_type`, `sales_order`.`base_grand_total` AS `total_amount`, `sales_order`.`base_subtotal` AS `subtotal_amount`, `sales_order`.`base_total_invoiced` AS `invoiced_amount`, `sales_order`.`base_shipping_amount` AS `shipped_amount`, `sales_order`.`base_tax_amount` AS `tax_amount`, `sales_order`.`base_discount_amount` AS `discount_amount`, `sales_order`.`base_total_refunded` AS `refunded_amount` FROM `sales_order_grid` AS `main_table`
 LEFT JOIN `shipperhq_order_detail_grid` AS `shipper_order_join` ON main_table.entity_id = shipper_order_join.order_id
 LEFT JOIN `sales_order` ON main_table.entity_id = sales_order.entity_id GROUP BY `main_table`.`entity_id` ORDER BY main_table.pickup_location ASC
 LIMIT 20) AS `a` at /var/www/html/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.pickup_location' in 'order clause' at /var/www/html/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php:91)"} []

Renaming /vendor/shipperhq/module-shipper/src/view/adminhtml/ui_component/sales_order_grid.xml.disable fixes the issue... it's possibly related to admin user permissions.

@wsadasmit
Copy link
Contributor

Hi @EmperorKonstantin,
I'm not able to replicate this issue. It seems an incomplete installation or removal of another module may have produced this state. If needed, we can provide further support for your issue if you can please email [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants