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

Getting issue while opening category page from admin rest all things working fine #3371

Open
sateesh285 opened this issue Sep 7, 2024 · 6 comments
Assignees
Labels

Comments

@sateesh285
Copy link

sateesh285 commented Sep 7, 2024

We are getting issue
A technical problem with the server created an error. Try again to continue what you were doing.
While opening category page we are getting the issue in admin page only. Can someone suggest what need to be done in order to fix this.
Error in browser console is :
/admin/virtualcategory/category_virtual/preview/ajax/1/store/1/key/bc30b87360402397dcc6b7ac8049dfb16462550dbabe160ffe44f8895b4c0fef/?isAjax=true:1

   Failed to load resource: the server responded with a status of 500 ()

image

@sateesh285
Copy link
Author

WE observed after clearing cache , clearing static cache and re deploying and reindexing solve the issue for while after that again we started getting this issue.

@vahonc
Copy link
Collaborator

vahonc commented Sep 9, 2024

Hello @sateesh285,

First of all, please respect the issue template and provide detailed information about your environment (versions of Magento and ElasticSuite) and steps to reproduce the issue. Otherwise, it's unlikely someone from our team will have a look at it.

Most probably something is wrong on your side, but at this moment it is hard to say what can be the reasons of your problem. We need more information about your environment.

Have you checked Magento and Elasticsearch logs or in the Console tab of your browser?

BR,
Vadym

@sateesh285
Copy link
Author

sateesh285 commented Sep 11, 2024

Magento: 2.4.6-p5

ElasticSuite: 2.11.8.3
elasticsearch ver. 7.17.23

Steps to produce:
We are getting this issue only on production not on lower env . IT may be becuase of we have larger set of data in prod and in staging it is 100s and thier it is working perfectly fine. HOwever in production we have around 20k product and while category from catalog we are getting this issue.

Please help us to fix this. We are using Porto theme.
This is the exception we are getting.
on frontend:
Failed to load resource: the server responded with a status of 500 ()

And in exception backend

[2024-09-08T11:24:24.136756+00:00] main.CRITICAL: TypeError: Smile\ElasticsuiteVirtualCategory\Model\Preview::getSortBy(): Return value must be of type string, null returned in /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php:224
Stack trace:
#0 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php(120): Smile\ElasticsuiteVirtualCategory\Model\Preview->getSortBy()
#1 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ProductSorter/AbstractPreview.php(158): Smile\ElasticsuiteVirtualCategory\Model\Preview->prepareProductCollection()
#2 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ProductSorter/AbstractPreview.php(199): Smile\ElasticsuiteCatalog\Model\ProductSorter\AbstractPreview->getProductCollection()
#3 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ProductSorter/AbstractPreview.php(101): Smile\ElasticsuiteCatalog\Model\ProductSorter\AbstractPreview->getUnsortedProductData()
#4 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Controller/Adminhtml/Category/Virtual/Preview.php(70): Smile\ElasticsuiteCatalog\Model\ProductSorter\AbstractPreview->getData()
#5 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview->execute()
#6 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->___callParent()
#7 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->Magento\Framework\Interception\{closure}()
#8 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/generated/code/Smile/ElasticsuiteVirtualCategory/Controller/Adminhtml/Category/Virtual/Preview/Interceptor.php(23): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->___callPlugins()
#9 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/App/Action/Action.php(111): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->execute()
#10 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch()
#11 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch()
#12 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->___callParent()
#13 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->Magento\Framework\Interception\{closure}()
#14 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch()
#15 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->Magento\Framework\Interception\{closure}()
#16 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/generated/code/Smile/ElasticsuiteVirtualCategory/Controller/Adminhtml/Category/Virtual/Preview/Interceptor.php(32): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->___callPlugins()
#17 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/App/FrontController.php(245): Smile\ElasticsuiteVirtualCategory\Controller\Adminhtml\Category\Virtual\Preview\Interceptor->dispatch()
#18 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#19 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#20 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#21 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#22 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#23 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#24 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#25 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#26 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#27 /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#28 {main} {"exception":"[object] (TypeError(code: 0): Smile\\ElasticsuiteVirtualCategory\\Model\\Preview::getSortBy(): Return value must be of type string, null returned at /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php:224)"} []
[2024-09-08T11:24:24.348655+00:00] main.CRITICAL: TypeError: Smile\ElasticsuiteVirtualCategory\Model\Preview::getSortBy(): Return value must be of type string, null returned in /home/1310403.cloudwaysapps.com/knwtmvdjmg/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php:224

@sateesh285
Copy link
Author

sateesh285 commented Sep 17, 2024

@vahonc Any update. We are eagerly waiting for your response

@sateesh285 sateesh285 removed their assignment Sep 17, 2024
@romainruaud romainruaud added bug and removed question labels Sep 19, 2024
@vahonc
Copy link
Collaborator

vahonc commented Sep 19, 2024

@sateesh285,

Are you sure that the difference between your environments is only in the number of products or maybe there is a difference in the config settings?

Can you provide what you have as below:

ScreenShot Tool -20240917130041

BR,
Vadym

@sateesh285
Copy link
Author

It is Product Name for our Case

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

No branches or pull requests

3 participants