后台无法正常的管理订单。
解决方法:
1.出错肯定第一时间查看具体的错误日志
[2022-04-13 02:59:02] main.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'allocated_sources' in 'order clause', query was: SELECT `main_table`.*, `braintree_transaction_details`.`transaction_source` FROM `sales_order_grid` AS `main_table`
LEFT JOIN `braintree_transaction_details` ON braintree_transaction_details.order_id = main_table.entity_id ORDER BY allocated_sources ASC
LIMIT 20 {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'allocated_sources' in 'order clause', query was: SELECT `main_table`.*, `braintree_transaction_details`.`transaction_source` FROM `sales_order_grid` AS `main_table`
LEFT JOIN `braintree_transaction_details` ON braintree_transaction_details.order_id = main_table.entity_id ORDER BY allocated_sources ASC
LIMIT 20 at /www/wwwroot/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'allocated_sources' in 'order clause' at /www/wwwroot/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"} []
2.此位置只是排序无效,在新版本中已经禁止了Allocated sources 点击排序。
打开
vendor/magento/module-inventory-shipping-admin-ui/view/adminhtml/ui_component/sales_order_grid.xml
变更内容从
<settings> <filter>false</filter> <label translate="true">Allocated sources</label> </settings>
到
<settings> <filter>false</filter> <label translate="true">Allocated sources</label> <sortable>false</sortable> </settings>
禁止此位置的排序 功能。
清空缓存,清空SESSION,再次进入后台,已经正常可操作订单啦 ~