0

Upgraded to latest version of magento which is 2.4.2-p1. Now static url's are coming like

/static/frontend/_view/en_US/Magento_Theme/favicon.ico

and site is broken. I did not find any solution of why url's are being created frontend/_view/en_US/Magento_Theme instead of frontend/package_name/theme_name/en_US/Magento_Theme

2 Answers 2

0

can you please try with below

sudo php bin/magento config:set web/unsecure/base_static_url http://127.0.0.1/m242/pub/static/
sudo php bin/magento config:set web/unsecure/base_media_url http://127.0.0.1/m242/pub/media/

and also check pub/static version sign is 1 or 0 using below command

sudo php bin/magento config:set dev/static/sign 1
5
  • already tried actually, issue is tat it is making different path like _view/en_US/Magento_Theme. that's why it is not picking up the files Commented Jul 6, 2021 at 7:24
  • have you check with my updated answer ? Commented Jul 6, 2021 at 7:25
  • yes that thing also checked in my system the dev/static/sign value will only add or remove versioning. but the path would always be _view/en_US, and that shouldn't be. Commented Jul 6, 2021 at 7:28
  • have you tried what compilation says ? Commented Jul 6, 2021 at 7:33
  • the compilation is working fine without any error. if you have an idea about using which file it adds the url for js and CSS. then it would be helpful for me. then I can debug... Commented Jul 6, 2021 at 7:38
0

This can happen if your theme wasn't installed properly.

Does your theme show up if you go to Content -> Themes ?

If not, check the theme configuration and run bin/magento setup:upgrade.

It could also happen if you're running Hyva, and the page matches a fallback page, but no theme was configured. (Or again, if the configured theme wasn't installed properly.)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.