Page 1 of 3
Phoaca Maps not displaying in custom module
Posted: 14 Jul 2016, 12:21
by mvalk
In Phoca Maps version 3.0.3 I could load a map inside a custom module without any issues, but in version 3.0.4 it displays an empty div with the id phocaMapPlgPM1. The map works fine inside an article, but it would be much easier to position it properly if I could display it from a custom module.
Re: Phoaca Maps not displaying in custom module
Posted: 15 Jul 2016, 01:44
by Jan
Hi, please let me know which method do you use to load the map in module position, so I can test it (will be great to get step by step guide)
Thank you, Jan
Re: Phoaca Maps not displaying in custom module
Posted: 15 Jul 2016, 08:59
by mvalk
First of all I checked that both Phoca Maps component and plugin are version 3.0.4. Then I created a new map with id 1 and gave it a height of 675 px. Then I created a custom HTML module and put the plugin code {phocamaps view=map|id=1} in there. The custom module has "Prepare Content" turned on and is set to display only on one page. When testing I noticed that the same map displays fine with the same plugin code inside an article. But when displayed from a custom HTML module it created an empty div with id phocaMapPlgPM1 on the page where the map is supposed to display. The empty div also has the map's set height of 675px. I also noticed that when loaded inside an article the map is initialized with the function
Code: Select all
function initMaps7() {
initMapPlgPM1();
}
but when loaded in a custom HTML module the function name is just initMaps without a number in the name.
Re: Phoaca Maps not displaying in custom module
Posted: 16 Jul 2016, 20:02
by Jan
Hi, thank you for the info, I will take a look at it, it seems like it has problem with counting the plugin instances when used in module (normally it will be not a problem to use it in module position, but it can happen, that more maps will be displayed in one article, so because of javascript conflicts, all the instances must be counted and specific name functions needs to be set)
I will take a look at it. Not sure if this will be possible to solve.

Re: Phoaca Maps not displaying in custom module
Posted: 17 Jul 2016, 19:30
by Jan
Hi, testing now, for me everything works OK, see image:
Even in the code is everything OK
I don't understand what is the number 7 in your code, this will indicate 7 plugins on one site?
Jan
Re: Phoaca Maps not displaying in custom module
Posted: 17 Jul 2016, 20:58
by Jan
I have made some changes there, added identifier to each part, try to update plugin and component this way:
- download the plugin now and install it on your site (plugin will be updated, even it is the same version 3.0.4)
- download the component now, unfortunately, when the same version 3.0.4 is installed over the same version 3.0.4, it ends with error because extension manager will try to install the update script, so
open the zip of the component, open the file inside the ZIP: update\sql\mysql\3.0.4.sql and remove both lines (this prevent from error which will be caused by installing the same version 3.0.4), close and save the file and install the ZIP
This should solve the problem.
Jan
Re: Phoaca Maps not displaying in custom module
Posted: 18 Jul 2016, 09:27
by mvalk
Thank you so much, it works now.
Re: Phoaca Maps not displaying in custom module
Posted: 18 Jul 2016, 11:40
by Jan
OK, great to hear it.
Jan
Re: Phoaca Maps not displaying in custom module
Posted: 15 Feb 2017, 15:22
by pawela
Hi,
I have similar problem with jevents here:
http://bit.ly/2lKrxJ6
I update component and plugin to 3.0.4, but still not work.
In article, maps display corectly. In jevents code prepare but not show maps.
Please help me.
Thanks.
Re: Phoaca Maps not displaying in custom module
Posted: 15 Feb 2017, 19:22
by christine
Hi pawela,
May be this belongs to JEvent (JEvents Addon).
https://www.jevents.net/docs/club-addon ... oogle-maps
Kind regards, Christine