Phoaca Maps not displaying in custom module
-
- Phoca Newbie
- Posts: 3
- Joined: 14 Jul 2016, 12:14
Phoaca Maps not displaying in custom module
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.
Tags:
- Jan
- Phoca Hero
- Posts: 48648
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoaca Maps not displaying in custom module
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
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 14 Jul 2016, 12:14
Re: Phoaca Maps not displaying in custom module
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
but when loaded in a custom HTML module the function name is just initMaps without a number in the name.
Code: Select all
function initMaps7() {
initMapPlgPM1();
}
- Jan
- Phoca Hero
- Posts: 48648
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoaca Maps not displaying in custom module
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.
I will take a look at it. Not sure if this will be possible to solve.

If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48648
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoaca Maps not displaying in custom module
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

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
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48648
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoaca Maps not displaying in custom module
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
- 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
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 14 Jul 2016, 12:14
Re: Phoaca Maps not displaying in custom module
Thank you so much, it works now.
- Jan
- Phoca Hero
- Posts: 48648
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoaca Maps not displaying in custom module
OK, great to hear it.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 15 Feb 2017, 15:16
Re: Phoaca Maps not displaying in custom module
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.
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.
-
- Phoca Hero
- Posts: 2872
- Joined: 28 Nov 2010, 17:20
Re: Phoaca Maps not displaying in custom module
Hi pawela,
May be this belongs to JEvent (JEvents Addon).
https://www.jevents.net/docs/club-addon ... oogle-maps
Kind regards, Christine
May be this belongs to JEvent (JEvents Addon).
https://www.jevents.net/docs/club-addon ... oogle-maps
Kind regards, Christine