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
Offline Compression Error #443
Comments
The same here. Seems django_compressor's COMPRESS_OFFLINE makes more problems than solves. I can't get it to work because receive such messages:
|
Same here :/ Can't get offline compression to work. Keep getting OfflineGenerationError. |
So i made sure i run the following during each deploy on all web servers python manage.py compress --force That should refresh the manifest.json file. Also i make sure the name of manifest file is different with each push. Like add a version number. manifest_%s.json Also i made sure collectstatic does not call --clear, to delete old static/* media. Make sense? |
ok I have exactly the same problem. |
please try: |
Last days I was busy resolving the same problem, and here is what was the fix, in case it helps to somebody. In one of the templates, where the issue was reproducible, I was using context. During offline compression there is no access to the context, that's why the key generated during offline compression, and the one from the response cycle are obviously going to be different. Try to isolate the parts of JavaScript where you are relying on context to another block, which is outside the compress tag. Hopefully this information helps somebody. |
I have spent a week debugging this (two different separate weeks) and am quite frustrated. I think I have read almost every article/blog post/issue out there, and don't know what to do. I have both a staging server and a production server (each with separate s3 buckets) and this works on staging, but not production, even though the servers (on Heroku) and the buckets are identical.
I have made it so compress tags only show up in the child template. I have removed all template tags from within compress tags (e.g if/else)., meaning I have more compress tags so the if/else statements can be outside the compress tags.
Does anyone have a functioning offline compression set up in production anywhere to look at? With compress offfline=False--there is significant extra load on the server, frequently an extra 300-500 ms delay, which obviously isnt worth it and defeats the whole purpose of this package.
I could really use some help, but basically have no idea what to do at this point, because its the same issue you can read about with hundreds of people in the issue list here, in blog posts elsewhere, and no repeatable solution seems to be being suggested--which is a huge problem for something this crucial to performance and that probably any Django deployment requires.
The text was updated successfully, but these errors were encountered: