Closed jorgb90 closed 1 year ago
Hi @jorgb90. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Seemed to be a hiccup in developer modus.. Will reopen if issue will occur again.
Reopening. Also getting it when trying to create an order and being in production mode.
`[2023-03-27T08:22:05.899818+00:00] main.CRITICAL: Error: Call to a member function limitTotalNumberOfProducts() on null in /home/xxx/public_html/var/view_preprocessed/pub/static/vendor/magento/module-backend/view/adminhtml/templates/widget/grid/extended.phtml:1 Stack trace:
Hi @jorgb90,
Thank you for reporting and collaboration.
Verified the issue on Magento 2.4-develop instance and Magento 2.4.6 instance the issue is not reproducible. Kindly refer the attached video.
We have enabled Production Mode
We are able to load the orders in admin panel.
Kindly recheck the behavior on Magento 2.4-develop instance and Magento 2.4.6 instance and elaborate steps to reproduce if the issue is still reproducible.
Thanks.
@engcom-Bravo Thanks for your update. We are getting it when we try to create an order in the backend. Loading orders is working fine after a refresh, so was probably a developer mode hiccup? Cant explain it for now, but creating keeps failing.
The function limitTotalNumberOfProducts() is new per Magento 2.4.6? We upgraded our Magento from 2.4.5-p1 to 2.4.6 so perhaps some tables are missing and not created per this upgrade? For example there are no "admin/grid/limit_total_number_of_products" or "admin/grid/records_limit" records in the "core_config_data" table for us.
@engcom-Bravo Update provided.
@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://06ea288fe8609769687a0827e4e1ef3d.instances-prod.magento-community.engineering Admin access: https://06ea288fe8609769687a0827e4e1ef3d.instances-prod.magento-community.engineering/admin_a7dc Login: cdae75da Password: 1a5160ce8340
Hi @jorgb90,
Thanks for your update.
Verified the issue while upgrading from 2.4.5-p1 to 2.4.6 we are not able to reproduce the issue.Kindly refer the screenshots.
We are able to create the order and load orders for backend.
Kindly check your system requirements https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html. and let us know if you are still facing any issue.
Thanks.
@jorgb90, here's an educated guess.
Magento 2.4.6 came with these changes: https://github.com/magento/magento2/commit/71ca7964d59b059d79c550c5d36d59025be23ec4#diff-79b43d7ec1e4894711fef491f2a7d4493528237d32d6806cde5e739c47bd6397
Pay close attention to the changes in the view/adminhtml/layout/*.xml
files.
My guess is that you will have some custom code (either written by your own, or by a 3rd party module) that has a Block that uses the template file vendor/magento/module-backend/view/adminhtml/templates/widget/grid/extended.phtml
, but didn't inject that new ViewModel.
This is something that could explain your problem.
Injecting that Magento\Backend\ViewModel\LimitTotalNumberOfProductsInGrid
to the Block should fix the problem.
Maybe this helps in trying to find the issue?
@hostep Many thanks! That was it!
Preconditions and environment
Magento 2.4.6 (upgrade from 2.4.5-p1)
Steps to reproduce
Expected result
Load order
Actual result
Error: Call to a member function limitTotalNumberOfProducts() on null in /home/xxx/public_html/vendor/magento/module-backend/view/adminhtml/templates/widget/grid/extended.phtml:77
Additional information
Release note
No response
Triage and priority