Bug #104805
openLinks with ?type=[number] should give a 404 error and not write a log for each such request
0%
Description
When requesting any page with ?type=[number], if the configuration for the type with that id is not found, it causes an error to be logged: TYPO3 Exception: #1294587217: The page is not configured!
This behavior can cause a database overflow if you loop through different numbers.
Suggested solution:
- add a check for a type with the requested id. If this id exists and is not configured, then add an error log, if no such id is found, show the user a 404 page without any error log
Updated by Garvin Hicking 5 months ago
- Category set to Link Handling & Redirect Handling
Updated by Garvin Hicking 5 months ago
Personally I've worked around this with a custom middleware liked described in https://www.in2code.de/aktuelles/php-typo3-log-eintraege-the-page-is-not-configured-type-vermeiden/ - however I think it's worth having a discussion about how to handle this, so thank you for bringing it up.
Updated by Maks Oleksyuk 5 months ago
Using custom middleware seems like a good solution. But it would be better to have this logic in the core, as it can be reproduced on most typo3 sites.
I also liked the idea of not giving out a 404, but redirecting to the page, but without the query parameter,
Updated by Garvin Hicking 5 months ago
- Related to Bug #104928: Passing a "type" array GET parameter triggers a PHP warning added