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
ckeditor is incompatible with ManifestStaticFilesStorage #192
Comments
Looks like no slash at the beginning of the path. The change made to URL generation of JS files was this one: 23b8a2e and it should work if your STATIC_URL is correctly set. |
No, the problem is that first part of url is wrong, news/new/.../static isn't correct, the correct ist static/static/... |
if the src is ="static/foo/bar.js" then it will be relative path which is wrong. if it would be "/static/foo/bar.js" then it should work correctly. What's the actual path in the raw HTML? |
I don't understand your question. |
Open the page source and check how they look. I have the latest version deployed in few places and all static files are working correctly. I assume you have something wrong with STATIC_URL - so check in the source, not in the rendered DOM what's the URL. and check/post what's your STATIC_URL. |
you can even do it without installing the new version. You can test the static() and STATIC_ROOT code example in manage.py/django-admin shell |
STATICFILES_DIRS = ('/home/salahaddinal/webapps/tiempoturco/tiempoturco/statics',)
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
STATIC_ROOT = '/home/salahaddinal/webapps/tiempoturco_static/static'
STATIC_URL = '/static/static/' I have this. |
I had the same problem of the field no showing.
|
If you have a custom storage then it's likely it will need its own finder too. I'll also check if there isn't any CachedStaticFilesStorage regressions in the latest release. |
Ok, i will put the DefaultStorageFinder in my settings and try if works, thanks. |
And now i have this issue:
I delete all static files and try collect it again, and, see. I searched and i find that this is a problem with CachedStorage... and is problem with the new url configuration, in 4.4.7 the urls in widgets were STATIC_URL+ but now is only static. |
I think you need slash on the end of STATIC_ROOT - https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-STATIC_ROOT |
Ok, i'll try with this. |
I am seeing this too. It can only be seen if DEBUG is False otherwise static takes a shortcut. Note that the ckeditor.js and ckeditor-init.js get found fine, it's config.js that is not found. This is because the 'static' call transforms the name to eg ckeditor.677756974519.js if you are using certain storages (ManifestStaticFilesStorage in my case), so if ckeditor is relying on its name to be ckeditor.js to find config.js, this will trip it up. The quick solution for those that are hitting this is to revert 23b8a2e and go back to the STATIC_URL version. Longer term would be to modify ckeditor.js to be smarter in how it finds its dependencies |
So it's not as easy as it looked like. |
Reverted in master. |
it's seems very difficult but, will be better use static but search the way for fix this bug. |
is there any update here? |
What update do you expect? At the moment no changes here. When I'll find some time I'll do some work on this package (there is a nice todo list). |
Oh yes, but, i was talking about the problem with change static_url gettin. |
It's hard to reproduce that config.js error with development server. Maybe circus/dj-static test setup could help test that. |
It seems I have the same problem here. If I'm using the version 5.0.3 from pip, my relevant (I think) config vars are:
Reading this thread, I feel this is the same problem as mine, but I didn't see any workaround for my issue. |
@SalahAdDin can you maybe rename this issue to something more descriptive? I suggest For all the guys out there that run into the same issue and turn to Google for help... |
the changelog for 5.2.0 has a fix for https://github.com/django-ckeditor/django-ckeditor/blob/master/CHANGELOG.rst
|
The fix in release 5.2.2 still doesn't work for me. See my comment in pull request #377 . |
This will be fixed in the next release. Please test the Thanks! |
Hmm, so you're saying that the code in |
@matthiask Ah, sorry, I just realised that I was actually testing 5.2.2. (For some reason, the deployment script I'm using didn't recognise a |
Great, thanks for testing! |
e080a82 has worked for me as well. Both in Development and in Production. |
Hi guys, i have now an error with django-ckeditor 4.4.8 in my web server.
The webserver is webfaction, and my problem is the next:
I was using ckeditor in my page and work's fine, i have 4.4.7 and then updated for 4.4.8, i don't remember if i restarted the server but ckeditor works fine.
Then, i restarted the server and i try to used ckeditor but i couldn't see anything, see:
I tried all things that i think, re collect static files, re put ckeditor urls in urls.py, all, but, nothing working.
But, in local server work fine, shure, doesn't used collecstatic, don't need it, but in the server doesn't works this.
Finally, i installed 4.4.7 and works again.
Compare the urls from the bugs in the before image and see here:
The source are correct loading in this case, correct url, but, with 4.4.8 the statics urls are wrong.
Then, i think that is the problem of 4.4.8 with static urls, but, i don't know why.
Can anyone fix it?
The text was updated successfully, but these errors were encountered: