0

I'm getting the wrong media, JS & CSS file path on the frontend and backend after installing Magento 2.4.2. Please review the below URLs we are getting. I've tried updating the value in the database core_config_data table, Also in-store configuration values.

enter image description here

asked May 30, 2021 at 18:21
7
  • Hi! Which part of the URL is invalid? Could you post full url path with example.com as domain mask? Commented May 30, 2021 at 18:39
  • Yes, Suppose the require js file url which I'm getting on frontend. example.com/static/frontend/Magento/luma/en_US/requirejs/… Commented May 30, 2021 at 18:43
  • What is your expected URL? Commented May 30, 2021 at 18:50
  • It should also include in baseURL/pub/static/..... currently it is not showing the pub folder before static folder Commented May 30, 2021 at 18:59
  • But could add to your question both URLs: correct one and current one? It definitely shouldn't have pub directory inside URL, because MAGE_ROOT/pub should be your default root location in vhost config file (root $MAGE_ROOT/pub; if you use nginx). Commented May 30, 2021 at 19:04

1 Answer 1

1

You need to put url in core_config like "https://example.com/pub/static/"

it will help you

answered May 31, 2021 at 6:34
3
  • 1
    It will work, but pub should never be in path on correctly configured Magento instance. Commented May 31, 2021 at 7:18
  • then please remove value from that field. make it empty it will help you. dont forget to clear cache after that Commented May 31, 2021 at 7:23
  • Yes it was cache related error. it fixed automatically after cache was disabled Commented Jun 1, 2021 at 13:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.