• Latest dev releases of WYSIWYG, File_Entity, Media, Media:Youtube, TinyMCE v3.4.7.
  • Insert multiple media objects into the body field of an article.
  • Without saving, disable the rich text editor, watch as the embedded code for the first item goes from a nested JSON string to raw HTML inserted to display the thumbnail image, i.e. the TinyMCE integration HTML code, e.g.:
    <p>Thingy</p><p><!--MEDIA-WRAPPER-START-1--><img class="media-element file-default" src="" alt="The IT Crowd | Friendface | Channel 4" data-file_info="%7B%22fid%22:%2290385%22,%22view_mode%22:%22default%22,%22fields%22:%7B%22format%22:%22default%22%7D,%22type%22:%22media%22%7D" /></p><p>&nbsp;</p><p>another one</p><p>[[{"fid":"90386","view_mode":"default","fields":{"format":"default"},"type":"media","attributes":{}}]]</p>
  • The borken code above is saved into the field.
  • When the node is edited the code will initially look the same as when it was first created, but disabling the WYSIWYG editor and re-enabling it causes the first media item (i.e. now a thumbnail image) to be removed.


thomjjames’s picture


I'm also experiencing this issue.

Key points:

  • Latest dev releases of WYSIWYG, File_Entity, Media, Media:Vimeo but with CKEditor
  • Seems to render ok in the CKEditor but once saved the frontend renders irregularly & then similar if going back in to edit the content.
  • Only workaround I could find was to use the CKeditor "div wrap" functionality to wrap each media item in divs but this is not a solid solution & can break easily on editing

Will continue to investigate now, but if anyone has any pointers please let me know.


DamienMcKenna’s picture

Title: Inserting multiple videos into one WYSIWYG field breaks the previous one » Inserting multiple media objects into one WYSIWYG field breaks the previous one

Expanding the scope of this as it's a general problem, not specifically limited to video.

thomjjames’s picture


Not 100% sure but I believe this could be related to #2067063: Wysiwyg integration is broken ?
I applied to the patch in #12 there and it did fix it.


thomjjames’s picture

Issue summary: View changes

This is a general problem not specifically limited to video.