[TYPO3-dev] problem with error handler if page is within restricted page tree

Martin Kutschker masi-no at spam-typo3.org
Wed Mar 11 12:51:42 CET 2009


Hi!

I'm currently playing with code that implements pageNotFound_handling
and pageUnavailable_handling. While doing that I noticed a strange
behaviour.

When a page is not accessible because it's access or time restrictions
the page-not-found status 1 is set ($TSFE->pageNotFound) and the
pageNotFound-handler is called.

BUT... when the page is WITHIN a restricted subtree the page-not-found
status 2 is set and the handler is not called in TYPO3 4.1 as it should.
In 4.2 a handler is called: the pageUnavailable-handler.

IMHO both versions are buggy. The correct handler to use in such a
situation is the pageNotFound-handler. It can (if USER_FUNCTION is used)
use the value of $TSFE->pageNotFound to determine if different actions
should be taken.

Any opinions?

Masi

PS: Another problem is that these 3 $TSFE conditions can only be checked
by looking for the error message.

'Page is not available in the requested language.'
'Page is not available in the requested language (strict).'
'Page is not available in default language.'

I suggest that 3 more values are added to $TSFE->pageNotFound or a new
$TSFE->languageError is introduced.




More information about the TYPO3-dev mailing list