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
Error on Internal links in Marker's description, depending on article menu position
-
- Phoca Member
- Posts: 11
- Joined: 03 Mar 2023, 11:24
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error on Internal links in Marker's description, depending on article menu position
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
-
- Phoca Member
- Posts: 11
- Joined: 03 Mar 2023, 11:24
Re: Error on Internal links in Marker's description, depending on article menu position
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
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
-
- Phoca Member
- Posts: 11
- Joined: 03 Mar 2023, 11:24
Re: Error on Internal links in Marker's description, depending on article menu position
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&view=article&id=3:article-3&catid=9:category2&Itemid=108">Article 3</a></p>
<p><a href="images/stories/file.pdf" target="_blank">Popeye</a></p>
Hopes that helps
Take care
Manuel
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&view=article&id=3:article-3&catid=9:category2&Itemid=108">Article 3</a></p>
<p><a href="images/stories/file.pdf" target="_blank">Popeye</a></p>
Hopes that helps
Take care
Manuel
-
- Phoca Member
- Posts: 11
- Joined: 03 Mar 2023, 11:24
Re: Error on Internal links in Marker's description, depending on article menu position
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;-)
As told earlier , this issue does not exist out of PhocaMaps ... as far I know;-)
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error on Internal links in Marker's description, depending on article menu position
Hi, can you paste a screenshot of where exactly is the content displayed?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 03 Mar 2023, 11:24
Re: Error on Internal links in Marker's description, depending on article menu position
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
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
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error on Internal links in Marker's description, depending on article menu position
OK
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 03 Mar 2023, 11:24
Re: Error on Internal links in Marker's description, depending on article menu position
Hi Jan
I'm back with some more explanation
Tests done from a fresh Joomla4 installation +PhocaMap extension
Created
- a Joomla article 'Article with link ' with 2 links
- a PhocaMap marker with exactly the same links in its description
Relative URL set in links for article :
index.php?option=com_content&view=article&id=3:article-3&catid=9:category2&Itemid=116
Relative URL set in links for file : images/file.pdf
Screenshot : https://i.imgur.com/DSsCGW7.jpg
TESTS
links http:// have been replaced below with htp: as links are restricted to 5 max by BBForum
1. With Search Engine Friendly URLs set to YES (sef=true - sef_rewrite=true - sef_suffix=true - unicodeslugs=true)
1.1 From Home
1.1.1 Map from Home
Link to article htp:localhost/Joomla4/index.php?option=com_content&...mid=116 > CORRECT
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
1.1.2 Article with link from Home
Link to article htp:localhost/joomla4/index.php/menu1/article-no-category SUCCESS -
URL is rewritten by SEF -
Link to file htp:localhost/joomla4/images/file.pdf > CORRECT
1.2 From Menu1
1.2.1 Map1 from Menu1
Link to article htp:localhost/Joomla4/menu1/index.php?option=com_content&...mid=116 > FAILS
Link to file htp:localhost/Joomla4/menu1/images/file.pdf > FAILS
1.2.2 Article edited with JCE with links from Menu1
Link to article htp:localhost/Joomla4/menu1/article-no-category.html
> - URL is rewritten SUCCESS despite the menu name is added to the url path
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
Difference is that Article uses the Search Engine Friendly syntax
----------------
2. Search Engine Friendly URLs Set to NO sef=false
2.1 From Home
2.1.1 Map from Home
Link to article htp:localhost/Joomla4/index.php?option=com_content&...mid=116 > CORRECT
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
2.1.2 Article with link from Home
Link to article htp:localhost/joomla4/index.php/menu1/article-no-category > CORRECT
Link to file htp:localhost/joomla4/images/file.pdf > CORRECT
2.2 From Menu1
2.2.1 Map1 from Menu1
Link to article htp:localhost/Joomla4/index.php?option=com_content&...mid=116 > CORRECT
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
2.2.2 Article edited with JCE with links from Menu1
Link to article htp:localhost/Joomla4/index.php?option=com_content&...mid=116 > CORRECT
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
--------
This issue occurs on test 1.2.1 when the map is displayed from a sub menu
It does not occurs with an article (test 1.2.2) though there a difference in rewritten url
It is related with Search Engine Friendly set to Yes
The workaround is to replace the relative URL by an absolute URL by adding https://mysite.com/ to the link but the problem is that it is replaced by the relative path each time the marker is edited and saved for any reason (ie change coordinates)
Hopes that helps
Manuel
I'm back with some more explanation
Tests done from a fresh Joomla4 installation +PhocaMap extension
Created
- a Joomla article 'Article with link ' with 2 links
- a PhocaMap marker with exactly the same links in its description
Relative URL set in links for article :
index.php?option=com_content&view=article&id=3:article-3&catid=9:category2&Itemid=116
Relative URL set in links for file : images/file.pdf
Screenshot : https://i.imgur.com/DSsCGW7.jpg
TESTS
links http:// have been replaced below with htp: as links are restricted to 5 max by BBForum
1. With Search Engine Friendly URLs set to YES (sef=true - sef_rewrite=true - sef_suffix=true - unicodeslugs=true)
1.1 From Home
1.1.1 Map from Home
Link to article htp:localhost/Joomla4/index.php?option=com_content&...mid=116 > CORRECT
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
1.1.2 Article with link from Home
Link to article htp:localhost/joomla4/index.php/menu1/article-no-category SUCCESS -
URL is rewritten by SEF -
Link to file htp:localhost/joomla4/images/file.pdf > CORRECT
1.2 From Menu1
1.2.1 Map1 from Menu1
Link to article htp:localhost/Joomla4/menu1/index.php?option=com_content&...mid=116 > FAILS
Link to file htp:localhost/Joomla4/menu1/images/file.pdf > FAILS
1.2.2 Article edited with JCE with links from Menu1
Link to article htp:localhost/Joomla4/menu1/article-no-category.html
> - URL is rewritten SUCCESS despite the menu name is added to the url path
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
Difference is that Article uses the Search Engine Friendly syntax
----------------
2. Search Engine Friendly URLs Set to NO sef=false
2.1 From Home
2.1.1 Map from Home
Link to article htp:localhost/Joomla4/index.php?option=com_content&...mid=116 > CORRECT
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
2.1.2 Article with link from Home
Link to article htp:localhost/joomla4/index.php/menu1/article-no-category > CORRECT
Link to file htp:localhost/joomla4/images/file.pdf > CORRECT
2.2 From Menu1
2.2.1 Map1 from Menu1
Link to article htp:localhost/Joomla4/index.php?option=com_content&...mid=116 > CORRECT
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
2.2.2 Article edited with JCE with links from Menu1
Link to article htp:localhost/Joomla4/index.php?option=com_content&...mid=116 > CORRECT
Link to file htp:localhost/Joomla4/images/file.pdf > CORRECT
--------
This issue occurs on test 1.2.1 when the map is displayed from a sub menu
It does not occurs with an article (test 1.2.2) though there a difference in rewritten url
It is related with Search Engine Friendly set to Yes
The workaround is to replace the relative URL by an absolute URL by adding https://mysite.com/ to the link but the problem is that it is replaced by the relative path each time the marker is edited and saved for any reason (ie change coordinates)
Hopes that helps
Manuel
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error on Internal links in Marker's description, depending on article menu position
Hi, unfortunately, this has nothing to do with Phoca Maps. This is the editor feature and depends on editor. I have no experiences with this but maybe this should be some general question on joomla.org forum to ask how to prevent editor (tinymce) to change the links when saving. If this is not the default editor then this is the question on editor developerbut the problem is that it is replaced by the relative path each time the marker is edited and saved for any reason (ie change coordinates)
Jan
If you find Phoca extensions useful, please support the project