Bug #15258
closed
Relative links (anchors) in current page & baseURL & RealURL
Added by David Worms almost 19 years ago.
Updated over 10 years ago.
Description
Relative links as created by rtehtmlarea are rendered as:
<a href="#451" target="_self">
The problem arises when used in conjonction with the setting config.baseURL = 1 (needed by RealURL). When clicking on a relative link, we are redirected to the root page as defined by baseURL.
The solution would be to display the path to the current page before the anchor.
(issue imported from #M1980)
Files
Thanks Sebastian for your feedback, I wrote a value of 1 to config.baseURL but the same apply for a URL. I've tried on both 3.8 and the latest 3.9dev CVS versions and problems are the same. This issue could be overcome by inserting an external link pointing to the current page but we lost the dynamic nature of typo3 based links.
Hi,
please change the config.baseURL value to your domain name and NOT to 1.
Or did I get you wrong now?
Greets, Sebastian
Sorry, you misunderstood what I wrote above, this is what I did. The problem has nothing to do with this. Typo3 generate a base tag in head as:
<base href="http://www.typo3.com/" />
and relative links in the page as
<a href="#c21"/>
When you click on the link, you are redirected to the base URL: http://www.typo3.com/#c21
Hi,
ok - now I get your point :-) This bug needs to be fixed in the typolink-function.
If you are able to provide a patch, this would be great, if not, I hopefully can provide one during the next week.
Greets, Sebastian
I just had a look at the typoLink function in tslib_content, it's huge. I'm afraid providing a patch to this function will be hard. I'll try, but i'm no so confident.
ok, no problem, I'll provide a patch during the next days for testing.
Greets, Sebastian
Hi,
after some digging I found the issue - please check if this solves your problem.
Greets, Sebastian
Hi,
sorry for not stating this more clearly. Please use the patch attached to the issue. When you confirm that this fixes your problem it will go to CVS.
Greets, Sebastian
Sebastien,
Cool, it fixed the issue. I saw in CVS that there been some other fixes to this function (realurl did not work with the title attribute). The patch should now apply to the line 5136. Great, thanks
Exactly the same problem apears again in typo3 6.2.4 I would be very happy to get a fix for that problem. Thanx
Also available in: Atom
PDF