wagtailwagtail-admin

Wagtail admin won't load most css or js static files


I have a site https://resilium.group that I recently upgraded to Wagtail 4.2 and added a generic admin view using ModelViewset to.

Now, if I visit /admin, some of the css and js fails to load, whereas it did before and I don't know why.

screenshot of requests

Some observations:

At this point, I struggle to even know where to look. I'm also having difficulty getting the issue reproduced locally. Everything works ok if I'm serving local static files. I appreciate any help you can give.


Solution

  • It turned out that the DigitalOcean static site I was using to build and host the static files wasn't configured correctly, so it wasn't using the Docker file that would make sure the environment for building the files was identical, which led to different files and hashes being generated than what the wagtail server expected. I made sure collectstatic was run inside the container, which solved it.

    What I'm left wondering is why this didn't blow up immediately a long time ago... :)