Module collects placeholders and replace data to multilevel array, which cannot be correctly processed. That happens because the static variable in the "_media_generate_tagMap" function doesn't cleared. Also, the "media_pre_render_text_format" function has unnecessary functionality.

My fix solves this problem perfectly and I propose developers to include my corrections to the module kernel.

Comments

br0ken’s picture

Version: 7.x-2.x-dev » 7.x-1.4
br0ken’s picture

StatusFileSize
new3.69 KB

Here is the patch for "7.x-2.x".

mariacha1’s picture

Status: Active » Needs review
mariacha1’s picture

Version: 7.x-1.4 » 7.x-2.x-dev

Status: Needs review » Needs work

The last submitted patch, 2: media-wysiwyg-tagmap-2285865.patch, failed testing.

br0ken’s picture

StatusFileSize
new4.06 KB
br0ken’s picture

Status: Needs work » Needs review
tocab’s picture

StatusFileSize
new3.65 KB

Proposal of a new patch based on the previous patch : media.filter.inc_.patch for the 2.0-alpha3 version because it fails patching the media.filter.inc file for me.

Status: Needs review » Needs work

The last submitted patch, 8: media.filter.inc_2.0-alpha3.patch, failed testing.

steinmb’s picture

Status: Needs work » Needs review
StatusFileSize
new4.06 KB

@tocab all patches need to be applied against latest dev. Patch in #6 apply just fine. Re-uploading patch untested.

grahamtk’s picture

What fixed this for me was applying the patch in #2328493: Async behavior of wysiwyg plugin attach/detach leads to some media tags not being replaced in time to 7.x-2.x-alpha4, maybe for you too?

paulsheldrake’s picture

What worked for me was applying the patch from #10 and the patch from #5 on this issue
https://www.drupal.org/node/2328493

This allowed me to have multiple editors and the media render correctly

br0ken’s picture

StatusFileSize
new3.62 KB

Here is the patch for 7.x-2.x.

And guys, I really want to believe that this changes will be applied to core, because my projects are falling every time after module updates.

areynolds’s picture

Status: Needs review » Needs work

Unfortunately this patch does not apply cleanly to the latest 2.x-dev, since the location of media_wysiwyg_pre_render_text_format() has been moved from media_wysiwyg.filter.inc to media_wysiwyg.module and has been refactored a bit.

However, I can confirm that when applying #13 to 2.x-alpha4 along with #5 from https://www.drupal.org/node/2328493 that the issue is resolved.

wheelercreek’s picture

I was running into the same issue - I can also confirm that these patches work, I added them both. Thanks for the work on these.

gmclelland’s picture

Are we sure this is still an issue with 7.x-2.x-dev? I tested with http://simplytest.me/project/media_dev/7.x-2.x by adding another body field to the article content type.

I added an image to each body field and saved the node. Everything seemed to function correctly. I am missing any steps?

br0ken’s picture

Maybe it was fixed, I don't know. Currently we using patched module.

Also, the patch cannot be applied now.

br0ken’s picture

Status: Needs work » Closed (won't fix)
avpaderno’s picture

Issue tags: -tagmap, -_media_generate_tagMap, -media_pre_render_text_format, -media, -filter, -wysiwyg