mastervanleeuwen / J-TrackGallery

GPS Track Gallery component for Joomla
https://mastervanleeuwen.github.io/J-TrackGallery/
6 stars 0 forks source link

Merging of JTRACK maps added to Event Booking Extension #37

Closed noelada closed 1 year ago

noelada commented 1 year ago

We are using Joomla 4, PHP 8.1 and Event booking extension by JoomDonation. We have been using GPXTRACKMAP to display maps and are looking at switching to JTRACK which has many nice features. We have two issues with JTRACK that we hope you can help with. The first is that where event booking displays multiple events on a single page, all JTRACK maps get merged together on the first map. The area where they should be located only has the link. This issue has been fixed by Marco The second is that when we click the link, the template changes to our Home template (with slideshow). You can see the issues by accessing our public page https://diamondvalleybwc.org.au . Click Activities on the MENU and scroll down to the last 3 activities. The activity test jtrack shows the fixed maps. Clicking either of the GPS Track links invokes our Home menu template. I can give you super user login if you need to check in more detail. Hope you can help. Noel Adams.

mastervanleeuwen commented 1 year ago

Hi Adam,

Thanks for reporting these issues. The problem with multiple maps appearing in one place has to do with how the plugin assign a unique identifier to each map. I have slightly changed the logic in this version:

https://github.com/mastervanleeuwen/J-TrackGallery/releases/download/0.9.34-rc24/plg_jtrackgallery_maps.zip

Could you give that version a try and let me know whether it works? The situation on your page is a bit specific because the different maps are rendered in separate activity posts; I don't have an easy way to reproduce this on my test page, so I am not completely sure that this version will work, but this was a fierst quick try. Note that if the plugin does not work at all, you may also have to update the main J-TrackGallery component: https://github.com/mastervanleeuwen/J-TrackGallery/releases/download/0.9.34-rc24/com_jtg.zip

For the other problem, I would like to understand how you assign the different templates to the different pages. Do you do that by assigning the template (page style) to different menu items? If so, you could try adding a J!TrackGallery menu item and assigning the template without the slide show to it. I think you can even have hidden menu items for this purpose. Which template(s) are you using? Is it a template that I can find/download somewhere to try out these settings?

Best regards, Marco.

noelada commented 1 year ago

Hi Marco, The updated plugin has fixed the first issue thank you. There is a minor problem with more than one map on the same activity. If the maps are different, they both appear correctly with their separate links. If the same map is repeated, it appears in the wrong place. If you look at the last activity (second jtrack test) I have put the same map in twice. It does not make sense to put the same map in twice, so this is not an issue to us. We are using the J51Magnolia template (J4 version). We have created two template styles. The default joomla template style is assigned to all menu items except the HOME menu item. The other template style (with slideshow) is only assigned to the HOME menu item. I created a new menu item for JTRACK files and specified the non slideshow template. When I access this item it uses the correct non slideshow template and displays all the files and the menu bar. I have added a trace to show the template style used: jtg1 The template style is correct If I click any item on the menu bar I get: jtg2

The template style has been changed to the default HOME template. The trace was added to components/com_jtj/jtg.php using a local WAMP server. Hope this helps and thanks once again, Noel.

mastervanleeuwen commented 1 year ago

Hi Noel,

Thanks for pointing out this issue. It took me some time to understand how this behaviour comes about, but I think I managed to make some improvements. Could you try the new version: https://github.com/mastervanleeuwen/J-TrackGallery/releases/tag/0.9.34-rc25 (both plugin and component)

And let me know whether this suppresses the slideshow for the J-Trackgallery pages?

Best regards, Marco.

noelada commented 1 year ago

Hi Marco,

Thank you for looking at this. (I noticed in the latest revision you have fixed the problem with the same map being displayed twice!). I have quickly tested the default/home template issue and you have fixed the unwanted change to default template when items from the jtrack menu bar are selected. The only thing that is not working is where the GPX Track link (below the map) is clicked. This link still calls the default/home template instead of the active menu item template. Thanks for your hard work and I hope you can find this last problem.

Regards and Best wishes,

Noel.

noelada commented 1 year ago

Hi Marco,

I have just discovered that with my WAMPSERVER test environment, everything is OK. I am going to try deleting everything from the production server and re-installing jtg. I will let you know the outcome.

Regards,

Noel.

noelada commented 1 year ago

Hi Marco,

I have worked out why the WAMP server worked and production site did not. I had a JTRACK menu item to show the overview and this menu item was not in the production system. I added this menu item as hidden in the production system and with the correct template style and voila, the GPX links now work as expected. This workaround is OK for us although I think it would be better if jtg could use by default the template style of the active menu item.

Thanks again,

Noel.