Error on Internal links in Marker's description, depending on article menu position

Phoca Maps - displaying maps in Joomla! CMS
ManuB
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 Mar 2023, 11:24

Error on Internal links in Marker's description, depending on article menu position

Post by ManuB »

Hi
I encounter an issue with relative links in marker's description.
I saw another topic that could be related 'Hyperlinks in Phoca Maps Marker Description' .
In my case, Joomla was migrated from 3.10 to 4.2.8 but PhocaMaps is a fresh 4.0 installation

Configuration :

Joomla 4.2.8
PhocaMaps 4.0.0
Text Editor = JCE Pro 2.9.33

- Create a PhocaMap marker with an internal link in its description leading to a file or another article (relative path)

- Create an article with the link to the map

- Create two menu links to this article :

> At the root of main menu > OK
> In a sub menu > the menu name is added to the path

The link is right when editing in marker description : index.php?option=com_content&view=article&id=495:adhesion&catid=10024:non-categorise&Itemid=286

clicking on marker's link from a menu at root = ok
> http://localhost/site1/index.php?option ... Itemid=286

clicking on marker's link from a sub menu 'Annonces'
> http://localhost/site1[b]/annonces-mainmenu-52[/b]/index.php?option=com_content&view=article&id=495:adhesion&catid=10024:non-categorise&Itemid=286
Where annonces-mainmenu-52 is the name of the sub menu
Deleting it from the absolute path in the web browser make it works

This is the same with a link to a file

http://localhost/site1/[b]annonces-mainmenu-52/[/b]images/stories/navigation/r%C3%A9cits/mediterrannee_2012.pdf

Of course, I tested this case with an link directly in the article in case the issue is related to text editor > it works in any case

Workaround would be to create absolute links but it is not the target ;-)

Thanks

Manuel
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 46292
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error on Internal links in Marker's description, depending on article menu position

Post by Jan »

Hi, sorry, I don't understand how the links inside description are related to double menu items problems?
If you find Phoca extensions useful, please support the project
ManuB
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 Mar 2023, 11:24

Re: Error on Internal links in Marker's description, depending on article menu position

Post by ManuB »

Hi Jan
I'd tried to get this issue on a fresh Joomla 4 install + PhocaMaps extension.
> Not able to get the same behaviour, so far.
I'll add the 3rd party extensions step by step, in case of compatibility issue.

The site having this issue is a migration from Joomla 3.10 to 4.2
Strange it only occurs with PhocaMaps markers

Take care
Manuel
ManuB
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 Mar 2023, 11:24

Re: Error on Internal links in Marker's description, depending on article menu position

Post by ManuB »

Hi Jan

I've found some time to have a look further with this issue.

Tested with fresh Joomla4 installation with only JCE Editor + PhocaMaps additional extensions
Indeed, the link pathes are wrong too, despite what I' said in my previous post

Having 2 markers in a map.
Marker1 description has a link to an article
Marker2 description has a link to a file

Created 2 articles
article 'Map1' is at root of main menu
article 'Map1fromMenu1' is in 'Menu1" sub menu

Resulting pathes are as follow :

Home > Article 'Map1'
Marker1 : link to article = http://localhost/joomla4/index.php/inde ... Itemid=108 > SUCCESS
Marker2 : link to file = http://localhost/joomla4/index.php/imag ... s/file.pdf > FAILS

Where 'index.php' is added to the path

Home > Menu1 > Article 'Map1fromMenu1'
- Marker1 link to article = http://localhost/joomla4/index.php/menu ... Itemid=108 =SUCCESS
- Marker2 link to file = http://localhost/joomla4/index.php/menu ... s/file.pdf > FAILS

Where 'index.php/menu1/' is added to the path
For articles, the target is reached despite the wrong path. On my own site, it fails.
For files, the page is not found. On my site, the path is correct !

I'd checked in database the table _phocamaps_marker , the relative pathes are correct :
<p><a href="index.php?option=com_content&amp;view=article&amp;id=3:article-3&amp;catid=9:category2&amp;Itemid=108">Article 3</a></p>

<p><a href="images/stories/file.pdf" target="_blank">Popeye</a></p>

Hopes that helps

Take care
Manuel
ManuB
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 Mar 2023, 11:24

Re: Error on Internal links in Marker's description, depending on article menu position

Post by ManuB »

Just in case, I'd uninstalled JCE to create a new marker with a different text editor > Same issue

As told earlier , this issue does not exist out of PhocaMaps ... as far I know;-)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 46292
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error on Internal links in Marker's description, depending on article menu position

Post by Jan »

Hi, can you paste a screenshot of where exactly is the content displayed?

Jan
If you find Phoca extensions useful, please support the project
ManuB
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 Mar 2023, 11:24

Re: Error on Internal links in Marker's description, depending on article menu position

Post by ManuB »

Hi Jan

The case looks to be related to SEO when 'Search Engine Friendly URLs' is set to YES in Joomla Global Configuration.
This occurs with relative URLs
The URL are always correct when it is set in an article wherever the article is in the menu tree.
The URL is not correct when the link is set in PhocaMaps marker's description.
I can't explain why this only occurs only with PhocaMaps. Some flag to add, telling to set SEF Off for links in markers ??
I'll try to send you screenshots with details and different tests that I did a soon I've time to

Manuel
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 46292
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error on Internal links in Marker's description, depending on article menu position

Post by Jan »

OK
If you find Phoca extensions useful, please support the project
Post Reply