-
Notifications
You must be signed in to change notification settings - Fork 3
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
Assets Broken in Menu Routes when using /kalastatic/prototype #24
Comments
ok, so I tried prepending the routes with |
So I stumbled upon
|
This makes me think that our paths to css/js files SHOULD be hitting index.php but as far as I can tell it's not. I tried putting a |
Had a good jam session with @RobLoach and @derekderaps and aside from some whacky ideas about
With this in place the server will find the css and js files because the url path matches the file path. This means that a user can't provide a path to Kalastatic in the config and renders the main config page pointless. I am, however, seeing this as a stop gap and I'm hoping @RobLoach will be able to figure out some magic that will enable us to provide server config to override the default behaviour that fast 404s the css and js when it doesn't exist in the file system. |
CSS/JS requests that are 404s are meant to be passed off to the menu router so that kalastatic can deliver it properly. The problem is that nginx reports a 404 before it can get to the menu route. Workaround has been taken to build out to |
@RobLoach @derekderaps I made an interesting discovery today—the pathing issues we’ve been having with Kalastatic D8 may not be a D8 issue after all. I just noticed on progenity that I’m having the same issue when visiting the prototype at @derekderaps are you able to look into getting DVM to mimic Pantheon's nginx config? |
Looks like we can customize nginx as needed, just gotta figureo ut the write configs. I'll add it to my list to look at! |
Thanks for looking at this @derekderaps. Check out @pirog link to see what they are doing in Kalabox. I haven't confirmed yet that it def works on Kalabox but I will report back when I get a chance |
Hmmm, adding in those configs from kalabox didn't seem to make a difference: nginx still won't serve dynamic routes that end in In D7 land though, I'm just going to go ahead and set Drupal VM's default webserver to Apache, cuz, um, that fixes it! |
@derekderaps as I mentioned in Slack, adding routes for ALL THE THINGS that isn't necessary anyway for D8 because I've climbed that mountain already. The problem doesn't exist on Pantheon or KB so there has to be a way... |
One other note about D7, it only works (with Apache) when Fast404 is disabled. Fast404 essentially does what nginx does by default: for certain filetypes, it detects whether the file exists and skips the whole bootstrap. |
I know "there's a way," I just don't know what the setting is and am not motivated to dive into the devops and figure it out. |
Alrighty, I've switched the default DrupalVM webserver from nginx to apache. You'll need to either destroy and rebuild or (1) ssh into the box and remove nginx from startup ( I would say after adding a note about Fast404 in the Kalastatic documentation, this issue can get closed out. @soniktrooth, where do you think is a good place for that note? Would you do the honours? |
Adding a stackoverflow link from @soniktrooth for me to check out. |
So I've run into a bit of an issue when it comes to serving the css and js through the menu route I set up.
After running some tests it seems that when trying to access a js or css file that is not inside the
/themes
folder then Drupal doesn't even boot—I get a server level 404. This isn't the case for html files which we are already successfully serving atkalastatic/*
.So I'm figuring there must be some sort of
.htaccess
type file that id ensuring a super quick 404 on css/js files that it assumes are never going to be a thing (even though we do, in fact, want it to be a thing). I don't see an.htaccess
anywhere so I'm guessing this sort of thing is handled in some other manner for D8 and at that point my eyes start to glaze over.I'm thinking this is a @RobLoach type issue. @RobLoach do you know what's causing this and if so do you think there's a way around it?
For now I'm considering serving Kalastatic from
/themes/kalastatic/*
just in order to get it working as a stop gap but any other suggestions would be welcome.The text was updated successfully, but these errors were encountered: