in progress jrEmbed 1.3.6 to 1.3.7 update breaks parameter value into array

SteveX
SteveX
@ultrajam
8 years ago
2,583 posts
Hi,

Ken Rich has reported a problem with using the ujGoogleMaps module TinyMCE embed.

I've found it to be caused by the latest jrEmbed update (1.3.6 to 1.3.7), specifically this change to the jrEmbed_replace_tag function:
    $params = array();
    foreach (explode(' ', $match) as $part) {
        list($k, $v) = explode('=', $part);
        $k = trim($k);
        $params[$k] = trim($v);
    }
The parameters before that code:
Quote:
[module] => ujGoogleMaps
[mode] => place
[location] => Corner Brook, NL, Canada
[maptype] => roadmap
And after:
Quote:
[module] => ujGoogleMaps
[mode] => place
[location] => Corner
[Brook,] =>
[NL,] =>
[Canada] =>
[maptype] => roadmap
Should it be doing that?

Thanks


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 09/15/16 01:41:41AM
michael
@michael
8 years ago
7,697 posts
probably that explode bit needs a $part,2 on it.

Got instructions for a test case to understand that its fixed? (being lazy can probably extrapolate it. will try. :) )
SteveX
SteveX
@ultrajam
8 years ago
2,583 posts
It's exploding the value of the parameter (location), which wasn't the way it worked until the current 1.3.8 update.

I've just uncommented the old code and commented out the new to get things working again


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 06/07/16 12:57:10AM
michael
@michael
8 years ago
7,697 posts
it was the call that prompted that code to fire i was hoping to get. Figure its probably
 [ jrEmbed module="ujGoogleMaps" mode="place" location="Corner Brook, NL, Canada" maptype="roadmap"] 

Will look into it. No that shouldn't be happening. Its a bug. Sorry for the inconvenience, we'll get it fixed up. Thanks for letting us know. :)
SteveX
SteveX
@ultrajam
8 years ago
2,583 posts
Ah, yes that's it, and it's through an embed_html listener that the jrEmbed_replace_tag function is called.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 06/07/16 07:23:04AM
brian
@brian
8 years ago
10,144 posts
I believe I have this fixed up for the next release of the module.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
8 years ago
2,583 posts
Thanks Brian! :)


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
8 years ago
7,697 posts
jrEmbed 1.3.8 is in the marketplace now. update or reload that module and it should be sorted.

(it was there for a short time without this fix, so reload if you are already running 1.3.8)

Tags