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

when click imagen browser not working #113

Closed
CARocha opened this issue Apr 29, 2014 · 11 comments
Closed

when click imagen browser not working #113

CARocha opened this issue Apr 29, 2014 · 11 comments

Comments

@CARocha
Copy link

CARocha commented Apr 29, 2014

Hi when i sutmit imagen all ok the imagen presented in ckeditor, but when i browser imagen no appear anything, this is url:
http://127.0.0.1:8000/ckeditor/browse/?CKEditor=id_texto&CKEditorFuncNum=1&langCode=es

and only see:
Browse for the image you want, then click 'Embed Image' to continue...
and gif ajax but no load any imagen, my configuracion in setting is:
MEDIA_ROOT = os.environ.get('MEDIA_ROOT',os.path.join(BASE_DIR, 'media'))
MEDIA_URL = '/media/'

CKEDITOR_UPLOAD_PATH = os.environ.get('MEDIA_ROOT',os.path.join(BASE_DIR, 'media'))

i used django 1.6.x and this packaged django-ckeditor-updated==4.2.8

what other configuration i need, for browser imagen load??

thank if any help me good direction!! :)

@riklaunim
Copy link
Contributor

You need to change CKEDITOR_UPLOAD_PATH - it's not absolute now, but relative against MEDIA_ROOT.

@CARocha
Copy link
Author

CARocha commented Apr 30, 2014

Hi, when i change the paths before CKEDITOR_UPLOAD_PATH = os.environ.get('MEDIA_ROOT',os.path.join(BASE_DIR, 'media'))
and now is:
CKEDITOR_UPLOAD_PATH = '/media/'

i have a error Bad Request (400)

when i change
MEDIA_ROOT = os.environ.get('MEDIA_ROOT',os.path.join(BASE_DIR, 'media'))
MEDIA_URL = '/media/'
CKEDITOR_UPLOAD_PATH = MEDIA_ROOT
again the page loading but nothing show me
Browse for the image you want, then click 'Embed Image' to continue...
seleccin_015

what would be the correct path? :/

@riklaunim
Copy link
Contributor

CKEDITOR_UPLOAD_PATH = 'foo/' (no slash)

and then it will upload to MEDIA_ROOT + 'foo/'

@CARocha
Copy link
Author

CARocha commented Apr 30, 2014

ok thank it work well thak so much

@CARocha CARocha closed this as completed Apr 30, 2014
@sarsanaee
Copy link

I did as you said but this line
CKEDITOR_UPLOAD_PATH = 'uploads/'
lead me to an error django-ckeditor CKEDITOR_UPLOAD_PATH setting error, no such file or directory: 'uploads'
I have uploads folder in my MEDIA_ROOT
django 1.5.5 python 2.7
my setting.py is like this :
MEDIA_ROOT = os.path.join(mainPath, "media")
MEDIA_URL = '/media/'
CKEDITOR_UPLOAD_PATH = "uploads/"
thanks

@riklaunim
Copy link
Contributor

if you are using django-ckeditor package then the CKEDITOR_UPLOAD_PATH is absolute. If you are using django-ckeditor-updated then relative.

@sarsanaee
Copy link

I installed django-ckeditor-updated but after that I couldn't even load the editor and a simple charfield just showed.

@riklaunim
Copy link
Contributor

you may need to run collectstatic and hard-refresh the browser to reload cached JS. If that doesn't help check if any of static files isn't giving 404.

@sarsanaee
Copy link

"GET /static/ckeditor/ckeditor/ckeditor.js HTTP/1.1" 404 1691I run collectstatic before .
indeed everything is ok about STATIC_URL , STATIC_ROOT

@riklaunim
Copy link
Contributor

The file is in the package - https://github.com/riklaunim/django-ckeditor/tree/master/ckeditor/static/ckeditor/ckeditor - so you must check your setup.

@sarsanaee
Copy link

Thank you for your support Problem solved

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

3 participants