Project

General

Profile

Bug #91517

Updated by Philipp Seiler over 4 years ago

* Have a typolink, e.g. created in a textmedia-element, that points to the same site to a different content element. The typolink should look something like *<a href="t3://page?uid=123#456">Link to content element on the current page</a>*, where 123 is the current site. 
 * The base-tag on the site gets set via *page.headerData* in order to dynamically get BaseVariants from the SiteConfiguration. Works nicely without needing additional conditions or configurations. The TypoScript setting _config.baseURL_ is *not* used. 
 * Link will be rendered incorrectly in the frontend. It will point to the root-URL of the current SiteConfiguration without the current path segment. E.g. if the page would be located under _my/path/segment/_ and the dynamically set base-URL is _https://www.mypage.com_, the link should be _https://www.mypage.com/my/path/segment#456_, it is rendered however like _https://www.mypage.com/segment#456_. Incorrect link and redirect when clicking. 
 * The Method _generateUrlForPageWithSiteConfiguration_ of the class _PageLinkBuilder_ checks if the TypoScript setting _config.baseURL_ is set. If it is not set, then the URL is rendered incorrectly to the root-URL. 

 * Setting _config.baseURL_ resolves the problem. The link will then be rendered correctly. 
 * However: As far as I can see, it is not possible to easily work with SiteConfigurations and BaseVariants with the _config.baseURL_-Setting. 
 * If I am not mistaken, one would have to use e.g. TypoScript-Conditions for each variant to set _config.baseURL_. This seems pretty cumbersome. It is also not very nice to introduce lots of conditions depending on the URL into your setup. 
 * Either there is a configuration method, that I have not considered yet, or the _config.baseURL_ should be changed to be able to dynamically set it. 
 * Or adjust the _generateUrlForPageWithSiteConfiguration_ method?

Back