Skip to content

cannot load js and css assets #16074

Answered by niden
TheBlindHawk asked this question in Q&A
Aug 26, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

There seems to be a problem with your rewrite rules (.htaccess). The app tries to interpret the paths for your assets as controller paths.

Try changing a bit your code to something like:

$this->assets->addCss('random/global.css');

and see that you get in the output

<link rel="stylesheet" type="text/css" href="/random/global.css">

If after that your message is RandomController handler class cannot be loaded then it is a rewrite rule issue for sure.

Replies: 2 comments 2 replies

Comment options

niden
Aug 26, 2022
Maintainer Sponsor

You must be logged in to vote
0 replies
Answer selected by TheBlindHawk
Comment options

You must be logged in to vote
2 replies
@niden
Comment options

niden Aug 29, 2022
Maintainer Sponsor

@TheBlindHawk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants