Closed (fixed)
Project:
Web Experience Toolkit (7.x)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2013 at 17:10 UTC
Updated:
14 Jan 2014 at 02:00 UTC
Jump to comment: Most recent
Comments
Comment #1
sylus commentedComment #2
sylus commentedFirst Commit will need to bring Media to latest dev and Update a patch we are using.
http://drupalcode.org/project/wetkit_widgets.git/commit/21957bd
Comment #3
sylus commentedI can get this fixed in PHP 5.3 using the following syntax. Problem is they won't take this patch as only works in PHP 5.3 using anonymous closures.
This needs to be rewritten:
Comment #4
spotzero commentedSince it looks like you want to replace each media token, one at a time, could you do it directly each the replacement string is calculated?
I think that code would look something like this:
Comment #5
sylus commentedI don't think str_replace will work because $match is a regular expression:
We would have to swap it with preg_replace but then would need the /e modifier as well.
Comment #6
spotzero commentedIsn't $match the matched media string? I.E.: "[[{some:json}]]"
I though MEDIA_WYSIWYG_TOKEN_REGEX was the regex.
Comment #7
sylus commentedYour right sorry brain dead today :)
Comment #8
sylus commented@spotzero++ seems to work for all my testing.
Code is added to issue here: https://drupal.org/node/2129273
Comment #9
sylus commentedComment #10
sylus commentedAm happy to say committed:
http://drupalcode.org/project/wetkit_widgets.git/commit/05f03ff
This will solve the duplicated images fiasco once and for all.
Thanks Gordon for catching this one!