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

You have offline compression enabled but key "cdfe134683bd23a2ea9de19b46490a13" is missing from offline manifest. #516

Closed
jgirdner opened this issue May 9, 2014 · 3 comments

Comments

@jgirdner
Copy link

jgirdner commented May 9, 2014

Ok figured I would post this here before I waste countless hours of my life trying to fix something someone might have an easy answer to. We are using django-compressor and are having issues when we set COMPRESS_OFFLINE = True. We seem to error below at random. Sometimes the page loads and sometimes it does not. It works perfectly fine with COMPRESS_OFFLINE = False.

You have offline compression enabled but key "cdfe134683bd23a2ea9de19b46490a13" is missing from offline manifest.

Here is a little details on our setup.

Django 1.6.3
django-compressor 1.3
google-cloud-storage 0.3
Nginx
Gunicorn

We are using google cloud to serve static content including the cache for compressor. Here are our settings for compressor.

STATIC_URL = 'https://xxxxx.storage.googleapis.com/static/'

COMPRESS_ENABLED = True

COMPRESS_OFFLINE = True
COMPRESS_STORAGE = 'google_folder_storage.google.CacheStorage'
CACHE_GOOGLE_PATH = "cache"
COMPRESS_URL = STATIC_URL
COMPRESS_CSS_FILTERS = [
    'compressor.filters.css_default.CssAbsoluteFilter',
    'compressor.filters.cssmin.CSSMinFilter',
]
@jgirdner
Copy link
Author

jgirdner commented May 9, 2014

I did pinpoint the problem to be with {% compress js inline %} I guess I just won't use that for now

@jgirdner jgirdner closed this as completed May 9, 2014
@jgirdner jgirdner reopened this May 9, 2014
@diox
Copy link
Member

diox commented May 9, 2014

It usually means you have dynamic content inside your {% compress %} blocks, or variables you didn't pass to COMPRESS_OFFLINE_CONTEXT. Would need to see more to debug, like your templates, manifest etc.

@jgirdner
Copy link
Author

jgirdner commented May 9, 2014

There was a couple issues. The first one was we had our GS_FILE_OVERWRITE = False which was creating a different version of the manifest each time we complied it. For example is was making a manifest_1.json. We solved that by creating a compress_settings.py with GS_FILE_OVERWRITE = True and just running the command with that settings file.

The next issue was caused by having variables in the {% compress js inline %}. I guess this issue can be closed now.

@jgirdner jgirdner closed this as completed May 9, 2014
@albertyw albertyw mentioned this issue Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants