Markers javascript error after upgrade

Phoca Maps - displaying maps in Joomla! CMS
rsd
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 21 Oct 2011, 21:58

Markers javascript error after upgrade

Post by rsd »

I just upgrade from 2.5 to 3.4.8.
Using Phoca Maps 3.0.3.

All markers give me a javascript error.
The javascript is dumped into the view.

If the Map has no javascript, it works fine (without a marker).
When I create any marker, the error shows up.

Here is what happens: http://snag.gy/AVVsI.jpg
rsd
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 21 Oct 2011, 21:58

Re: Markers javascript error after upgrade

Post by rsd »

Ok, found the cause and a bug.

The problem was being caused by the SEO Glossary content plugin.
It was suppressing the </script> tag and putting it inside a maker content variable which caused havoc.

During this process for some reason, calling PhocaMapsHelper::strTrimAll() (line 417) on marker $text was adding extra </div> tags.
Before it, $text was:

Code: Select all

<div style="font-size:120%;margin: 5px 0px;font-weight:bold;">test</div>
and after:

Code: Select all

<div style="font-size:120%;margin: 5px 0px;font-weight:bold;">test</div><div></div>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Markers javascript error after upgrade

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply