No Code Attached Yet Information Required
avatar o-joomla-issues
o-joomla-issues
22 Apr 2024

Steps to reproduce the issue

Edit article
Add link per link icon with target like /#my-startpage-anchor

Expected result

<p>Some link to an <a href="/#my-startpage-anchor">anchor</a></p>

Actual result

<p>Some link to an <a href="#my-startpage-anchor">anchor</a></p>
⇨ Leading slash removed, link will not work on any sub-page/url

System information

Joomla! ‎5.1.0
PHP 8.3.4 as fpm-fcgi on nginx

Additional comment

Trailing slash also gets removed when adding link manually in html source code w/ tyinmce editor turned off.

avatar o-joomla-issues o-joomla-issues - open - 22 Apr 2024
avatar o-joomla-issues o-joomla-issues - change - 22 Apr 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 22 Apr 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Apr 2024
avatar richard67
richard67 - comment - 22 Apr 2024

Same as #43324 ? Or only similar?

avatar brianteeman
brianteeman - comment - 22 Apr 2024

@richard67 different issue

avatar brianteeman
brianteeman - comment - 22 Apr 2024

Is this something that used to work? There have been quite a few changes in 5.1 which may have created this https://github.com/joomla/joomla-cms/pulls?q=is%3Apr+trailing+slash+is%3Amerged

avatar o-joomla-issues
o-joomla-issues - comment - 23 Apr 2024

Just checked, same problem in Joomla 3.10.12


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43332.

avatar chmst
chmst - comment - 24 Apr 2024

@o-joomla-issues I cannot replicate your problem with tinyMCE. j 5.1.0,

I write your link in html-mode, save and the result is

<p>Some link to an <a href="../#my-startpage-anchor">anchor</a></p>

avatar o-joomla-issues
o-joomla-issues - comment - 24 Apr 2024

Where does the .. come from? .. is different from / and might not lead to the start page.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43332.
avatar chmst
chmst - comment - 24 Apr 2024

I used tinyMCE entered your code into an article and saved. This was the result after saving the article therefore comes from tinyMCE.

avatar o-joomla-issues
o-joomla-issues - comment - 25 Apr 2024

That's odd. With all Joomla versions I manage, it never adds dots. Maybe we have different settings for URL rewrite.
But either - removing leading slash or adding dots - is an issue as it breaks links.
TincMCE should not change links in any way.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43332.

avatar brianteeman
brianteeman - comment - 19 Aug 2024

Have you tried setting tinymce to use absolute instead of relative urls?

image

avatar Quy Quy - change - 19 Aug 2024
Labels Added: Information Required
avatar Quy Quy - labeled - 19 Aug 2024

Add a Comment

Login with GitHub to post a comment