I use the latest ckeditor.module, ckeditor.library and media.module.
While creating a post all inserted images displays fine. Also when viewing the post the images show up.
But: when editing an existing post the media tags aren't converted in the edit field. Instead I see the raw media tag data, e.g.
[[{"type":"media","view_mode":"media_original","fid":"22","attributes":{"alt":"","class":"media-image","height":"250","typeof":"foaf:Image","width":"250"}}]]
Also, the media button is now missing.
When viewing the edited post upon saving, the images don't show up and neither do the media tags.
This shouldn't be a permissions problem as I'm doing all this as the admin.
Any ideas?
Comment | File | Size | Author |
---|---|---|---|
#6 | ckeditor-add-media-filter-to-security-filters-1445272-6.patch | 525 bytes | Peacog |
Comments
Comment #1
mkesicki CreditAttribution: mkesicki commentedCan you write steps to reproduce your issue. It will be easier and faster to find this bug and solution for it.
Which version of media module do you use ?
Comment #2
jscm CreditAttribution: jscm commentedI have the same problem. I create a new node and insert image from url using ckeditor image tool. When I edit node, ckeditor filters
<img>
or<a><img>
tag and remove it.how can I fix it?
I tried to manage ckeditor security filter without success. image urls used for test are facebook image download links.
Comment #3
mkesicki CreditAttribution: mkesicki commentedPlease try use latest stable or DEV version of module. There are changes about filtering and security filters. New logic of filtering use only selected security filters during editing of node.
Now only changes made by security filers will be perform during node editing.
Comment #4
mkesicki CreditAttribution: mkesicki commentedComment #5
warpedgeoid CreditAttribution: warpedgeoid commentedI just ran into this issue with version 7.x-1.13+8-dev. I know the reason (XSS) for not including certain filters when loading contents, but not processing media tags greatly reduces the usefulness of the editor. Our users don't see this as just a security precaution, they see it as a bug that breaks the WYSIWYG nature of the editor.
I've worked around this by adding 'media_filter' to the allowed list of filters in ckeditor.lib.inc, but I wanted to comment here to get the community's and the maintainer's opinions.
Comment #6
Peacog CreditAttribution: Peacog commentedI ran into this issue too, and agree that it could be seen as a bug, or at least a serious usability issue for non-tech content editors. I've taken warpedgeoid's suggestion and rolled a patch that adds the media filter to CKeditor's list of security filters.
Comment #7
Peacog CreditAttribution: Peacog commentedChanging version to reflect patch...
Comment #8
Peacog CreditAttribution: Peacog commentedOops. Also changing category...
Comment #9
wwalc CreditAttribution: wwalc commentedMedia tag filter is definitely not a security filter, the proposed solution should not touch the security-related parts of the module just to execute another filter.
Comment #10
Jody LynnConfirming patch in #6 fixes bug in latest dev 7.x-1.14+2-dev in which the media tags are not converted in the ckeditor. (Although I could not reproduce the disappearance of the media button described in the original post)
It may not be the right solution as explained in 9, but it's necessary for now.
Comment #11
Jody LynnActually the ckeditor patch in #1504696: Integration with CKEditor module comment 5 also fixes it (without this patch), but I did have to also disable ACF.
I am using media 2.0-alpha3. So possibly on media dev this issue is fixed, but I've been burned so many times chasing media dev I have nightmares.