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

dddave’s picture

Status: Active » Postponed (maintainer needs more info)

Can this be recreated with the latest dev? A lot of development has happened since this was reported...

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed
dddave’s picture

Wohooo!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.