rvalitov / widgetkit-map-ex

Responsive version of Yootheme's Map Widget (Widgetkit2) with center map point and advanced features
GNU General Public License v3.0
22 stars 3 forks source link

Problem loading of multiple mapEX widgets using a switcher #66

Closed Firepeet closed 7 years ago

Firepeet commented 7 years ago

Expected behaviour

Using multiple maps with media and selecting those with a switcher.

Steps to reproduce the behavior

First select with the switcher the first tab (Leuk voor kinderen). The map is loading correctly. Then select the 2nd tab (Omliggende steden), the map is grey. This happens only when by both maps in the settings tab show media is checked and there is some media loaded in the content of the map.

CMS type: Joomla

CMS version: 3.6.5

Version of the widget: v1.5.7

Website URL: http://sub.strandchalet.com/omgeving This is a temporary url. Website is under construction.

code of the switcher:

<div> <ul class="uk-subnav uk-subnav-pill" data-uk-switcher="{connect:'#id-1',swiping:false}">
<li class="uk-active"><a href="/">Leuk voor kinderen</a></li>
<li><a href="/">Omliggende steden</a></li>
<li><a href="/">Musea</a></li>
<li><a href="/">Uitgaan</a></li>
<li><a href="/">Eten & drinken</a></li>
</ul>
</div><br>

<div>
<ul id="id-1" class="uk-switcher">
<li>[widgetkit id="107"]</li>  
<li>[widgetkit id="109"]</li>  
<li>[widgetkit id="110"]</li>  
<li>[widgetkit id="111"]</li>  
<li>[widgetkit id="112"]</li>  
</ul>
</div>

Al widgetkit id's are mapEX widgets. Id's 110, 111 and 112 don't have loaded media.

rvalitov commented 7 years ago

Hello! I failed to reproduce this problem. On my demo website everything works fine with the switcher. The URL you mentioned doesn't work, I see 403 error. Can you please provide access to your website, so that I can investigate this issue deeper? If it's password protected, you can send me the credentials to my email ramilvalitov@gmail.com. Thank you!

Firepeet commented 7 years ago

Hello Ramil, Thank you for your reply and help. The site was still secured with admin tools ;-) This security is now disabled, so you can access the site now.

rvalitov commented 7 years ago

Yes, I can see it now. Did you correctly setup the center point for the map, which is placed on the second tab? Otherwise you will see a error like this: image

Firepeet commented 7 years ago

The map center point are correctly setup (52.369938, 4.783378).

It`s strange that when i have this problem, and i change the size of the screen (or i tilt the phone), the map is visible. But when i change to the first tab of the switcher i see the same problem by the first map. When i disable the option "display the image inside the popup" the problem is not present. It looks like a bug.

rvalitov commented 7 years ago

I made a patched file widget.php. Please, download it and update (replace) it on your website inside MapEx folder. After that, activate "Debug output" mode for all the widgets inside the switcher. Then, notify me, and I will look again on your website.

Firepeet commented 7 years ago

I activate the Debug Output of the widgets in de switcher, and I placed the widget.php file in the folder: /administrator/components/com_widgetkit/plugins/widgets/map_ex

rvalitov commented 7 years ago

Please, replace the old file with the new one, that I sent you. It's located here /administrator/components/com_widgetkit/plugins/widgets/map_ex/views/widget.php

Firepeet commented 7 years ago

Done :-)

rvalitov commented 7 years ago

Thanks. I see the technical basis why this situation happens. It happens only for the 1st and 2nd widgets. The last 3 are fine. Now I need to figure out how the first 2 widgets differ from the other 3 and understand the reason that leads to this behavior... You mentioned that option "display the image inside the popup" is important here. Please, try to activate this option for the last widget, so that I can see the difference. Thank you!

Firepeet commented 7 years ago

the problem is only present when the option "display the image inside the popup" is activated, and there is selected media in the Content. In all widgets the option "display the image inside the popup" are checked, but only the first 2 widgets have selected media.

rvalitov commented 7 years ago

In this case, please, deactivate this option for the first widget, for testing... Thank you!

Firepeet commented 7 years ago

Done

rvalitov commented 7 years ago

Yes, deactivating this option really solved the situation. I will work on a patch. I still need this URL, so please, leave it open (online) until I finish my work. Thank you!

Firepeet commented 7 years ago

No problem, i leave it open

rvalitov commented 7 years ago

Still can't solve this issue, because on my hosting I can't replicate this situation. No matter if I activate the "media" option or not, all the rendering is correct. May be there are some other options of the MapEx which also have effect on this matter. Can you please send me login & password to access the Joomla backed, so that I can investigate this issue? Please, send them privately to my email ramilvalitov@gmail.com Otherwise, it seems I can't understand why this issue happens...

rvalitov commented 7 years ago

This problem is caused by the Media Alignment option: image

If this option is set to Left or Right, then the map has incorrect rendering inside the switcher. For other alignment options the map is displayed correctly. Now I will check if it's possible to fix this.

Firepeet commented 7 years ago

Great that you have found what causes is of the problem. Hopefully you can fix it.

rvalitov commented 7 years ago

I made the patch. Please download the file from here, and replace the old file on your server with the new one. You can find the old file on your server in folder _/administrator/components/com_widgetkit/plugins/widgets/mapex/views/

After that please report about the results.

Firepeet commented 7 years ago

Yeah, great job!!! 👍 Your patch solved this problem 🥇