Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Scenario:
- 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="http://example.com/files/styles/large/public/media-youtube/6rNgCnY1lPg.jpg?itok=VOM08_US" 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> </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.
Comments
Comment #1
thomjjames CreditAttribution: thomjjames commentedHi,
I'm also experiencing this issue.
Key points:
Will continue to investigate now, but if anyone has any pointers please let me know.
Cheers
Tom
Comment #2
DamienMcKennaExpanding the scope of this as it's a general problem, not specifically limited to video.
Comment #3
thomjjames CreditAttribution: thomjjames commentedHi,
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.
Thanks
Tom
Comment #3.0
thomjjames CreditAttribution: thomjjames commentedThis is a general problem not specifically limited to video.
Comment #4
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedClosing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team