Fixed! Issues Getting Joomla Google Maps Plugin to Work?

Whilst having difficulties implementing a Google Maps Plugin to work with the 128Bit website, I started digging around, analysing the source code and wondering why when I was putting in the text {mosmap} on the pages, that it just was not displaying the google map where it was supposed to.

After careful investigations of the source code, I noticed that in the Javascript, there was a suspicious line with the following incorrect syntax:

if (formObj.dirflg.checked) {

Noticing this, I thought that this was a bug in the code. After analysing the plugin_googlemap2.php file, the lines were displayed as:

if (formObj.dirflg[i].checked) {

What this meant was there was another plugin that was interfering with the [i] code. The 128Bit website has a plugin called RokCandy installed, which provides BBcode-type functionality into Joomla. It changes preset syntax, such as [example] to the relevant HTML code, once Joomla parses the article.

If you have this installed, you will need to disable the [i][/i] macro to prevent it converting it to an tag. This can be done via Components > RokCandy > Macros, then disabling the [i][/i] macro. Of course, you will need to double check first that your code does not rely on this macro, otherwise you can substitute this to something else e.g. [italics][/italics].

This is what allowed me to overcome the issue of a non-displaying Google Map in Joomla for me. Your implementation may differ to mines as it could be conflicting with another script besides RokCandy. Even so, I would like to hear how you fixed this issue on your site and be kind enough to share it with others.

This should also assist in helping a large number of uses who are commenting and following instructions from the Good Web Practices website too.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.