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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkesicki’s picture

Status: Active » Postponed (maintainer needs more info)

Can 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 ?

jscm’s picture

I 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.

mkesicki’s picture

Please 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.

mkesicki’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)
warpedgeoid’s picture

I 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.

Peacog’s picture

Status: Closed (won't fix) » Needs review
FileSize
525 bytes

I 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.

Peacog’s picture

Version: 7.x-1.6 » 7.x-1.x-dev

Changing version to reflect patch...

Peacog’s picture

Category: support » bug

Oops. Also changing category...

wwalc’s picture

Issue summary: View changes
Status: Needs review » Needs work

Media 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.

Jody Lynn’s picture

Confirming 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.

Jody Lynn’s picture

Actually 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.