[TYPO3-core] RFC #9412: config.absRefPrefix can force wrong URL when linking across domains

Dmitry Dulepov [typo3] dmitry at typo3.org
Tue Sep 23 11:10:27 CEST 2008


Hi!

This is SVN patch request.

Type: bug

Branches: trunk, 4.2

BT reference: http://bugs.typo3.org/view.php?id=9412

Problem: if config.absRefPrefix contains scheme and domain name ("http://example.com/"), it will force wrong URL when linking across domains. typoLink must strip absRefPrefix from the URL in such case because absRefPrefix applies only to the current domain. Additionally absRefPrefix will create a link to the current domain and not to the expected domain.

Solution: strip absRefPrefix from the URL if linking across domains is enabled and another domain is detected.

How to test: create two domain records on different pages. Set different config.absRefPrefix in the TS template for each domain. absRefPrefix must look like "http://domain.tld/". Now add text element on any page and make two links: one to the domain for this page and another for the second domain. Look in the FE, both links will point to the current domain, though path for the second link will to another domain. Apply the patch, clear page cache and reload the page. Now all links are correct.

Note: I think this is one of two last bugs for absRefPrefix in TYPO3. The other bug is about prepending absRefPrefix to some paths inside TYPO3 but it needs more investigation. If these two bugs are fixed, we could finally get rid of config.baseURL forever (and all problems that it causes).

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/tag_your_typo3_extension_releases_in_svn/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typolink_absRefPrefix.diff
Type: text/x-diff
Size: 3024 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080923/6b6e711c/attachment.diff 


More information about the TYPO3-team-core mailing list