Bug #15258
closedRelative links (anchors) in current page & baseURL & RealURL
0%
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
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
config.baseURL=1 is not allowed anymore, as it imposed a security risk!
See http://typo3.org/teams/security/security-bulletins/typo3-20051114-6/ and http://typo3.org/development/articles/release-notes-381/page/2/ for more information and please inform us here if this fixed your problem.
Instead, use config.baseURL=http://your.domain.name here.
Greets, Sebastian
Updated by David Worms almost 19 years ago
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.
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
please change the config.baseURL value to your domain name and NOT to 1.
Or did I get you wrong now?
Greets, Sebastian
Updated by David Worms almost 19 years ago
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
Updated by Sebastian Kurfuerst almost 19 years ago
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
Updated by David Worms almost 19 years ago
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.
Updated by Sebastian Kurfuerst almost 19 years ago
ok, no problem, I'll provide a patch during the next days for testing.
Greets, Sebastian
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
after some digging I found the issue - please check if this solves your problem.
Greets, Sebastian
Updated by Sebastian Kurfuerst almost 19 years ago
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
Updated by David Worms almost 19 years ago
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
Updated by Falk Ulrich over 10 years ago
Exactly the same problem apears again in typo3 6.2.4 I would be very happy to get a fix for that problem. Thanx