[TYPO3-dev] Scheme enforcement in 4.5.x

Felix Nagel lists at felixnagel.com
Thu Dec 8 17:13:37 CET 2011


Am 08.12.2011 09:54, schrieb Ernesto Baschny [cron IT]:
>>> No need to try to parse typoscript settings from remote trees where you
>>> are linking to. The destination page should know what to do. This also
>>> handles the case when external links points to a page which is supposed
>>> to be HTTPS (and user is going to it with HTTP): the magic redirects the
>>> user to the correct protocol.
>
>> So you would like to extend the redirect functionality within function
>> fetch_the_id (class.tslib_fe.php) instead of my approach (typoLink
>> function in class.tslib_content.php), right?
>>
>> I assume this would be working, but I was not able to get a TS config in
>> that function (via somehting like
>> $GLOBALS['TSFE']->config['config']['urlScheme']) -- some Core Dev tips
>> here? ;-)
>
> I don't think this will be possible, because at that time, the
> TypoScript rendering is not yet done. And for a good reason: If the
> decision that the page should come from cache, we don't *want* to have
> parsed all TypoScript before that (because that's the idea of the page
> cache = to output the page as fast as possible and with as little
> rendering overhead as possible).

Just to be sure: we talking about the fetch_the_id function which has no 
idea of TS, correct?

>
> So maybe it would be better to introduce the default protocol as a
> TYPO3_CONF_VAR array, where you can have a mapping from domainname to
> default scheme?

Would be a solution but I did not understand is: whats the problem with 
my posted changes to typoLink? It works pretty nice (please note: ive 
uploded a new version at bugs.typo3.org) and should add hardly unwanted 
overhead.

And why not adding the TS parsing for the linked page in typoLink? You 
just said there is no need, but as fetch_the_id does not know TS it 
would be a solution. Ok, it adds overhead but it would be possible to 
use TS everywhere in the pagetree!

If there is a major reason this is not possible I would agree to use a 
TYPO3_CONF_VAR array to mimimize user confusion why their page specific 
default scheme set via TS wont work as expected ;-)


-- 
Regards
Felix Nagel



More information about the TYPO3-dev mailing list