I'm using version 7.x-2.10 of CDN module and version 7.x-1.18 of CKEditor module. These are the steps to replicate the issue:
1) Create a new content.
2) In the body field, click on the button "Add media". A pop up will appear.
3) Upload a new image. Before submitting the image, you'll see a screen like in the screenshot, but you won't see the image. If you right click on it and open image in a new tab, you'll see that the cdn url has been generated. If you check in the files folder, the image has been uploaded.
I've created a provisional patch to not use cdn on ckeditor images, but probably there's a better approach. My patch excludes admin paths from cdn and check that the file exists before overriding the url.
Comment | File | Size | Author |
---|---|---|---|
cdn-patch-ckeditor.patch | 1.22 KB | guardiola86 | |
Screen Shot 2018-07-17 at 14.24.25.png | 340.42 KB | guardiola86 |
Comments
Comment #2
Wim LeersDid you recently update modules? I'm very very surprised that this bug would only be discovered now, more than a year after the last CDN module release and more than a year after the latest CKEditor module release.
OTOH, it looks like you're using the Media Browser module? It sounds like it's not working in there?
Comment #3
guardiola86 CreditAttribution: guardiola86 commentedThe modules were updated some time ago, but the CDN was disabled because of that issue with CKEditor.
The site is using CKEditor Media Browser and Media CKEditor.
Comment #4
Wim LeersOk. So the problem only manifests when using https://www.drupal.org/project/ckeditor_media.
I just looked at https://cgit.drupalcode.org/ckeditor_media/tree/plugins/mediaBrowser/plu..., and it has this:
This is the root cause. Not the CDN module. Moving to the right issue queue :)
Comment #5
guardiola86 CreditAttribution: guardiola86 commentedAh ok. Thanks for looking into it :)
Comment #6
guardiola86 CreditAttribution: guardiola86 commentedComment #7
guardiola86 CreditAttribution: guardiola86 commentedI've updated the project, I've noticed it's actually happening in media_ckeditor module.
Comment #8
guardiola86 CreditAttribution: guardiola86 commentedComment #9
guardiola86 CreditAttribution: guardiola86 commentedReverting it, it's actually in CKEditor Media Browser, having two modules with a similar name is confusing.
Comment #10
guardiola86 CreditAttribution: guardiola86 commentedI wonder though, if it wouldn't be easy to add this to the function cdn_file_url_alter:
CKEditor is especially problematic and I don't really see the point of using CDN in admin pages.
Comment #11
guardiola86 CreditAttribution: guardiola86 commentedI'm still struggling with this. What I've noticed is, that even though the cdn path to the image is correct, the image doesn't exist in the cdn. Any idea why is this happening? Thanks.