1

I’m encountering a strange issue with a fresh installation of Magento 2.4.7-p2.

The problem: Some JavaScript files from RequireJS are not loading with the correct path on a simple page refresh, but they load correctly after a hard refresh. Specifically, the domReady.js file should load from this path:

pub/static/adminhtml/Magento/backend/en_US/requirejs

However, on a normal refresh, it tries to load from:

pub/static/adminhtml/Magento/backend/en_US/

Without the requirejs directory, which causes issues with admin panel elements.

Example: On a simple refresh, the domReady.js file attempts to load from the wrong directory, breaking some admin functionalities. But on a hard refresh, the file loads correctly from the proper path.

Screenshot: (Include screenshot here showing the incorrect and correct paths)

enter image description here

Has anyone else faced this issue, and is there a solution to ensure the JS files load properly on a normal refresh?

Thank you in advance!

2 Answers 2

0

I have got the solution.

I issue was one of the requirejs-config.js file is placed inside the web folder in should be outside the web folder.

0

In my case, I have identified the issue with PayPal_Braintree.

The following PayPal_Braintree JS file is causing the problem:

PayPal_Braintree/js/system.js 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.