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

Wrong request path to markdown.js #55

Closed
dismine opened this issue Dec 3, 2018 · 2 comments
Closed

Wrong request path to markdown.js #55

dismine opened this issue Dec 3, 2018 · 2 comments

Comments

@dismine
Copy link

dismine commented Dec 3, 2018

Hello,
Can someone help me with very weird bug? On production settings ace.js makes request to invalid path. Something like this: https://<domain>/en/patterns/snippets/markdown.js/ where correct path must be https://<domain>/static/plugins/js/snippets/markdown.js/. Development server on local machine doesn't produce such a behaviour. Maybe i miss some setting?

@dismine
Copy link
Author

dismine commented Dec 10, 2018

I have resolved this issue. Combination Django Compressor and django-sekizai creates conflicts somehow. Disabling compression restores everything.

@dismine dismine closed this as completed Dec 10, 2018
@sodrew
Copy link

sodrew commented Feb 2, 2023

Strangely, enough, I'm having a very similar issue when trying to render a martor edit widget when I use the following in my settings.py:

STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'

DEBUG = true

The URL for markdown.js is ignoring the static files location and is trying to nest within the page structure that it is getting served, while at the same time ace.js is giving me this error:

Unable to infer path to ace from script src, use ace.config.set...

It's definitely related to the fact that ManifestStaticFilesStorage is creating separate versioned static files. I believe the Django Compressor also does something similar with the static files (adding a hash of the version to the filename, and therefore tied to the issue @dismine was having. I have no conflict with django-sekizai.

All other js and css files are unaffected.

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