Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS and JS files paths are not correct if website is installed in server subdirectory #129

Open
piotrpog opened this issue Aug 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@piotrpog
Copy link

piotrpog commented Aug 11, 2022

This is most likely related to Twigpack plugin. There is console errors like this:

bootstrap:108 Uncaught (in promise) Error: Loading CSS chunk 1 failed.
(/assets/dist/css/styles.6f82a377c329418c8101.css)
    at r.<computed>.r.<computed>.<computed>.t.push.r.<computed>.d.onerror (bootstrap:108:17)

It seems that javascript is trying to load files with address like http://localhost/assets/dist/js/styles.6f82a377c329418c8101.js, ignoring subdirectory. File links in Twig files are outputted correctly and contain subdirectory in which Craft is installed.

@piotrpog piotrpog added the bug Something isn't working label Aug 11, 2022
@JayGreentree
Copy link

Open the .env file and change DEFAULT_SITE_URL= to your desired url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants