magento2
magento2 copied to clipboard
Updated magento with latest version 2.4.7-p1 or 2.4.7-p2 getting issue
Preconditions and environment
- Magento version 2.4.7-p1 or 2.4.7-p2
- when open the website getting this issue Error: Call to a member function isGlobalScopeEnabled() on null in D:\htdocs\m24\vendor\magento\module-customer\view\frontend\templates\account\authentication-popup.phtml:26 after comment code in authentication-popup.phtml getting below error -when open then frontend website getting this Exception #0 (ReflectionException): Class "Auth" does not exist
Steps to reproduce
update magento with 2.4.7-p1 or 2.4.7-p2 run upgrade and compile command
Expected result
frontend website should work without any error.
Actual result
frontend showing error as
Additional information
No response
Release note
No response
Triage and priority
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [ ] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @hemendrametawolf. 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- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this - To learn more about issue processing workflow, refer to the Code Contributions.
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 @hemendrametawolf. It appears to be a bug in magento. In particular, \Magento\Customer\ViewModel\Customer\Auth class is missing from a block parameter declaration in default.xml in your theme. However, the error is thrown due to the classname being called instead of FQN in vendor/magento/module-customer/view/frontend/templates/js/customer-data.phtml on line 14
$auth = $block->getAuth() ?? ObjectManager::getInstance()->get(Auth::class); The solution is to add the missing parameter to the block with name "customer.customer.data" making it as following:
<block name="customer.customer.data" class="Magento\Customer\Block\CustomerData" template="Magento_Customer::js/customer-data.phtml"> <arguments> <argument name="auth" xsi:type="object">Magento\Customer\ViewModel\Customer\Auth</argument> <argument name="json_serializer" xsi:type="object">Magento\Customer\ViewModel\Customer\JsonSerializer</argument> <argument name="cookie_settings" xsi:type="object">Magento\Customer\ViewModel\CookieSettings</argument> </arguments> </block>
Hi @engcom-Delta. 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:
- [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
- [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
- [ ] 3. Add
Area: XXXXXlabel to the ticket, indicating the functional areas it may be related to. - [ ] 4. Verify that the issue is reproducible on
2.4-developbranchDetails
- Add the comment@magento give me 2.4-develop instanceto deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-developbranch, please, add the labelReproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! - [ ] 5. Add label
Issue: Confirmedonce verification is complete. - [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @hemendrametawolf,
Thanks for your reporting and collaboration. We have verified the issue in 2.4.7 to 2.4.7-p2 version, but we are unable to reproduce the issue. Kindly refer the screenshots.
Steps to reproduce
- Install 2.4.7 version
- Upgrade to 2.4.7-p2 version
- Run upgrade and compile command
- Access Frontend and Admin
Please let us know if any other steps are needed to be performed.
Thanks.
Hi @hemendrametawolf ,
We have noticed that this issue has not been updated since long time. Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.
Thanks.