-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Noticed exception 'TypeError' when the product_list_order parameter is an array. #37827
Comments
Hi @adam-krakowski-accenture. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
@magento give me 2.4-develop instance |
Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Dash, here is your Magento Instance: https://363deb92f651eefc97cf2debc5e32652.instances-prod.magento-community.engineering |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the attached video. Steps to reproduce
We are not getting any exception after changing the URL could you please let us know if we are missing anything. Untitled.32.mp4Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible. Thanks. |
Hello @engcom-Bravo, |
@magento give me 2.4-develop instance |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://363deb92f651eefc97cf2debc5e32652.instances-prod.magento-community.engineering |
@magento I am working on this |
Hi @jenyatrishin! 👋 |
@magento add to contributors team |
Hi @jenyatrishin! 👋 |
@magento I am working on this |
Preconditions and environment
Steps to reproduce
Examples of URL:
https://release4.proshop.pg.com/whitening/crest-whitestrips.html?product_list_order[]=price&product_list_dir=desc
https://ca.magento2.local/shop-by-product/crest-whitening.html?product_list_order[]
Expected result
The product_list_order parameter with an array type is handled correctly.
vendor/magento/module-catalog/Model/Product/ProductList/ToolbarMemorizer.php
The getOrder() function returns string|bool value as described in the @return tag
Actual result
TypeError: Illegal offset type in isset or empty in /var/www/magento/vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php:280
vendor/magento/module-catalog/Model/Product/ProductList/ToolbarMemorizer.php
The getOrder() function returns array value (invalid @return tag), which causes a TypeError
Additional information
TypeError: Illegal offset type in isset or empty in /var/www/magento/vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php:280
Stack trace:
#0 /var/www/magento/app/code/PG/GaGtm/Model/ProductCollection/CategoryCollectionFilter.php(62): Magento\Catalog\Block\Product\ProductList\Toolbar->getCurrentOrder()
#1 /var/www/magento/app/code/PG/GaGtm/Model/ProductCollection/CollectionGetter.php(46): PG\GaGtm\Model\ProductCollection\CategoryCollectionFilter->filter()
#2 /var/www/magento/app/code/PG/GaGtm/Observer/Products/LoadCollection.php(58): PG\GaGtm\Model\ProductCollection\CollectionGetter->getCollection()
#3 /var/www/magento/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): PG\GaGtm\Observer\Products\LoadCollection->execute()
#4 /var/www/magento/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod()
#5 /var/www/magento/vendor/magento/module-staging/Model/Event/Manager.php(97): Magento\Framework\Event\Invoker\InvokerDefault->dispatch()
#6 /var/www/magento/generated/code/Magento/Staging/Model/Event/Manager/Proxy.php(95): Magento\Staging\Model\Event\Manager->dispatch()
#7 /var/www/magento/vendor/magento/framework/View/Result/Layout.php(169): Magento\Staging\Model\Event\Manager\Proxy->dispatch()
#8 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult()
#9 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent()
#10 /var/www/magento/vendor/magezon/module-core/Plugin/View/Result/Layout.php(24): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}()
#11 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(135): Magezon\Core\Plugin\View\Result\Layout->aroundRenderResult()
#12 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}()
#13 /var/www/magento/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(95): Magento\Framework\View\Result\Page\Interceptor->___callPlugins()
#14 /var/www/magento/vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult()
#15 /var/www/magento/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#16 /var/www/magento/vendor/magento/framework/App/Bootstrap.php(267): Magento\Framework\App\Http\Interceptor->launch()
#17 /var/www/magento/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: