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

Order Grid - Search by FB/IG Order Id field doesn't work #44

Open
ihor-sviziev opened this issue Nov 14, 2023 · 1 comment
Open

Order Grid - Search by FB/IG Order Id field doesn't work #44

ihor-sviziev opened this issue Nov 14, 2023 · 1 comment

Comments

@ihor-sviziev
Copy link

ihor-sviziev commented Nov 14, 2023

Preconditions (*)

  1. Magento 2.4.5-p5
  2. Meta for Magento 1.2.0
  3. Configured order sync

Steps to reproduce (*)

  1. Go to Admin > Sales > Orders
  2. Open the grid filters
  3. Try searching any number by the FB/IG Order ID field

Expected result (*)

  1. Order grid should be filtered
  2. There shouldn't be any errors

Actual result (*)

  1. Order grid isn't filtered, error message is shown
image 2. In the logs we see the following stacktrace:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'facebook_order_id' in 'where clause' in /path/to/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:90
Stack trace:
#0 /path/to/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(90): PDOStatement->execute()
#1 /path/to/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(106): Magento\Framework\DB\Statement\Pdo\Mysql->Magento\Framework\DB\Statement\Pdo\{closure}()
#2 /path/to/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(91): Magento\Framework\DB\Statement\Pdo\Mysql->tryExecute(Object(Closure))
#3 /path/to/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement.php(313): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#4 /path/to/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#5 /path/to/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
#6 /path/to/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(564): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*)...', Array)
#7 /path/to/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(634): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT COUNT(*)...', Array)
#8 /path/to/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(828): Magento\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array)
#9 /path/to/magento2/vendor/magento/framework/Data/Collection/AbstractDb.php(222): Zend_Db_Adapter_Abstract->fetchOne(Object(Magento\Framework\DB\Select), Array)
#10 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/DataProvider/SearchResult.php(166): Magento\Framework\Data\Collection\AbstractDb->getSize()
#11 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/DataProvider/DataProvider.php(260): Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult->getTotalCount()
#12 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/DataProvider/DataProvider.php(286): Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider->searchResultToOutput(Object(Magento\Sales\Model\ResourceModel\Order\Grid\Collection\Interceptor))
#13 /path/to/magento2/vendor/magento/module-ui/Component/Listing.php(38): Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider->getData()
#14 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/Context.php(250): Magento\Ui\Component\Listing->getDataSourceData()
#15 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/ContentType/Json.php(69): Magento\Framework\View\Element\UiComponent\Context->getDataSourceData(Object(Magento\Ui\Component\Listing))
#16 /path/to/magento2/vendor/magento/module-ui/Component/AbstractComponent.php(158): Magento\Framework\View\Element\UiComponent\ContentType\Json->render(Object(Magento\Ui\Component\Listing), 'templates/listi...')
#17 /path/to/magento2/vendor/magento/module-ui/Controller/Adminhtml/Index/Render.php(91): Magento\Ui\Component\AbstractComponent->render()
#18 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Ui\Controller\Adminhtml\Index\Render->execute()
#19 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callParent('execute', Array)
#20 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}()
#21 /path/to/magento2/generated/code/Magento/Ui/Controller/Adminhtml/Index/Render/Interceptor.php(23): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins('execute', Array, Array)
#22 /path/to/magento2/vendor/magento/framework/App/Action/Action.php(111): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->execute()
#23 /path/to/magento2/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#25 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callParent('dispatch', Array)
#26 /path/to/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#29 /path/to/magento2/generated/code/Magento/Ui/Controller/Adminhtml/Index/Render/Interceptor.php(32): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins('dispatch', Array, Array)
#30 /path/to/magento2/vendor/magento/framework/App/FrontController.php(245): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#31 /path/to/magento2/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse(Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor), Object(Magento\Framework\App\Request\Http))
#32 /path/to/magento2/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor))
#33 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#34 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#35 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#36 /path/to/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#37 /path/to/magento2/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#38 /path/to/magento2/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#39 /path/to/magento2/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#40 {main}

Next Zend_Db_Statement_Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'facebook_order_id' in 'where clause', query was: SELECT COUNT(*) FROM `sales_order_grid` AS `main_table` WHERE  (((`facebook_order_id` LIKE '%978488523227076%'))) in /path/to/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:109
Stack trace:
#0 /path/to/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(91): Magento\Framework\DB\Statement\Pdo\Mysql->tryExecute(Object(Closure))
#1 /path/to/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement.php(313): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#2 /path/to/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /path/to/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
#4 /path/to/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(564): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*)...', Array)
#5 /path/to/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(634): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT COUNT(*)...', Array)
#6 /path/to/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(828): Magento\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array)
#7 /path/to/magento2/vendor/magento/framework/Data/Collection/AbstractDb.php(222): Zend_Db_Adapter_Abstract->fetchOne(Object(Magento\Framework\DB\Select), Array)
#8 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/DataProvider/SearchResult.php(166): Magento\Framework\Data\Collection\AbstractDb->getSize()
#9 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/DataProvider/DataProvider.php(260): Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult->getTotalCount()
#10 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/DataProvider/DataProvider.php(286): Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider->searchResultToOutput(Object(Magento\Sales\Model\ResourceModel\Order\Grid\Collection\Interceptor))
#11 /path/to/magento2/vendor/magento/module-ui/Component/Listing.php(38): Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider->getData()
#12 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/Context.php(250): Magento\Ui\Component\Listing->getDataSourceData()
#13 /path/to/magento2/vendor/magento/framework/View/Element/UiComponent/ContentType/Json.php(69): Magento\Framework\View\Element\UiComponent\Context->getDataSourceData(Object(Magento\Ui\Component\Listing))
#14 /path/to/magento2/vendor/magento/module-ui/Component/AbstractComponent.php(158): Magento\Framework\View\Element\UiComponent\ContentType\Json->render(Object(Magento\Ui\Component\Listing), 'templates/listi...')
#15 /path/to/magento2/vendor/magento/module-ui/Controller/Adminhtml/Index/Render.php(91): Magento\Ui\Component\AbstractComponent->render()
#16 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Ui\Controller\Adminhtml\Index\Render->execute()
#17 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callParent('execute', Array)
#18 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}()
#19 /path/to/magento2/generated/code/Magento/Ui/Controller/Adminhtml/Index/Render/Interceptor.php(23): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins('execute', Array, Array)
#20 /path/to/magento2/vendor/magento/framework/App/Action/Action.php(111): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->execute()
#21 /path/to/magento2/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callParent('dispatch', Array)
#24 /path/to/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#25 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#26 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /path/to/magento2/generated/code/Magento/Ui/Controller/Adminhtml/Index/Render/Interceptor.php(32): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins('dispatch', Array, Array)
#28 /path/to/magento2/vendor/magento/framework/App/FrontController.php(245): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /path/to/magento2/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse(Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor), Object(Magento\Framework\App\Request\Http))
#30 /path/to/magento2/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor))
#31 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#33 /path/to/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#34 /path/to/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#35 /path/to/magento2/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#36 /path/to/magento2/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#37 /path/to/magento2/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#38 {main}
@ihor-sviziev
Copy link
Author

@zlik

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

1 participant