magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Updated magento with latest version 2.4.7-p1 or 2.4.7-p2 getting issue

Open hemendrametawolf opened this issue 1 year ago • 4 comments

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 image image

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”.

hemendrametawolf avatar Aug 21 '24 10:08 hemendrametawolf

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:


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.

m2-assistant[bot] avatar Aug 21 '24 10:08 m2-assistant[bot]

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>

snigam123 avatar Aug 21 '24 10:08 snigam123

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: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced 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: Confirmed once verification is complete.
  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

m2-assistant[bot] avatar Aug 23 '24 04:08 m2-assistant[bot]

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

  1. Install 2.4.7 version
  2. Upgrade to 2.4.7-p2 version
  3. Run upgrade and compile command image image
  4. Access Frontend and Admin image image Please let us know if any other steps are needed to be performed.

Thanks.

engcom-Delta avatar Aug 26 '24 06:08 engcom-Delta

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.

engcom-Delta avatar Sep 11 '24 05:09 engcom-Delta