Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Article editor - cannot link to an anchor on start page #43332

Open
o-joomla-issues opened this issue Apr 22, 2024 · 8 comments
Open

Article editor - cannot link to an anchor on start page #43332

o-joomla-issues opened this issue Apr 22, 2024 · 8 comments

Comments

@o-joomla-issues
Copy link

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.

@richard67
Copy link
Member

Same as #43324 ? Or only similar?

@brianteeman
Copy link
Contributor

@richard67 different issue

@brianteeman
Copy link
Contributor

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

@o-joomla-issues
Copy link
Author

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.

@chmst
Copy link
Contributor

chmst commented Apr 24, 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>

@o-joomla-issues
Copy link
Author

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.

@chmst
Copy link
Contributor

chmst commented Apr 24, 2024

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

@o-joomla-issues
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants