I had a problem displaying multiple (and different) videos in a WYSIWYG textarea whereby the first video would show the video-x-generic.png icon (expected) but the second would just show the unfiltered [[{"type":"media"}}]] text where the icon should be repeated.
I traced the problem to line 228 in media_pre_render_text_format in media.filter.inc:
drupal_add_js(array('tagmap' => array_unique($tagmap)), 'setting');
The array_unique was breaking the tagmap by removing the second array element. I suggest that array_unique should be removed. It's entirely possible for two media elements to render to the same markup at this stage of rendering - especially in the case of generic icons - and the result is a broken tagmap. This is happening in 7.x-1.0-beta5 but I tagged this issue as 7.x-2.0-unstable1 as the relevant line is still there (although I haven't tested so re-tag if not a problem in that version).
Comments
Comment #1
dddave commentedCan this be recreated with the latest dev? A lot of development has happened since this was reported...
Comment #2
dave reidThis has already been fixed with http://drupalcode.org/project/media.git/commit/bf6fa85
Comment #3
dddave commentedWohooo!