[TYPO3-english] Hi, a question about bug - 0008343: improved 404 pagenotfound_handling not working for certain requested URLs/resources

Matthew K - (Swagman Solutions) typo3 at swagmansolutions.com.au
Tue Feb 16 03:03:41 CET 2010


Hi All,

How can I have this bug assigned, reviewed and repaired which has was 
reported back in May 2008.

This bug relates to the way in which the the typo3 core handles '404 error 
handling', which at the moment fails to handle 404 errors correctly.


Following here is the description in detail from 
http://bugs.typo3.org/view.php?id=8343 which also has details & code 
suggestions with potential 'how to fix':

----------------------------------------------------------------------------------------

When using default TYPO3 .htaccess file and with or without 'simulate static 
documents' it appears that 404 pagenotfound_handling works only for 
requested files:

            - that have .html as the file suffix
            - and the file being called is requested from the root of a 
typo3 site, i.e. www.domain.com.au/file.html

If 'file.html' exists, page is shown

If 'wrongfile.html' does not exist then correct 404 handling takes place 
correctly, due to function '$this->checkAndSetAlias()'

The '404 pagenotfound_handling' feature fails to show the 404 headers for 
the following requested resources:

- www.domain.com.au/file.htm
- www.domain.com.au/file.pdf

- www.domain.com.au/folder/
- www.domain.com.au/folder/file.html
- www.domain.com.au/folder/file.pdf

When the above requested resources fail, the browser is given a 200 OK http 
header and is shown the home page of the website with the requested 
resources URL remaining in the browsers address bar. This could be due to 
$this->id being 'false' and then $this->id is set to '0' in function 
'setIDfromArgV()'.

My suggested code to patch class.tslib_fe.php works on the premise that 
$this->TYPO3_CONF_VARS['FE']['pageNotFound_handling'] value is TRUE, but 
perhaps the TYPO3 404 handling should still work when 
$this->TYPO3_CONF_VARS['FE']['pageNotFound_handling'] is FALSE and therefore 
still show 404 headers and redirect to home page/ root page of website.

----------------------------------------------------------------------------------------

Any thoughts greatly appreciated with regards to this matter.

Kind regards,

Matthew K
Swagman Solutions




More information about the TYPO3-english mailing list