Issue Bug Resolved

#104805Links with ?type=[number] should give a 404 error and not write a log for each such request

Maks Oleksyuk 09/03/24, 17:02 updated 10/01/26, 08:20

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

Reviews 2

History 914

  1. Garvin Hicking commented <span data-processor="relativetime" data-value="2024-09-04T13:27:08+00:00" > 09/04/24, 13:27 </span>

    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.

  2. Maks Oleksyuk commented <span data-processor="relativetime" data-value="2024-09-04T17:05:52+00:00" > 09/04/24, 17:05 </span>

    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,

  3. Oliver Hader commented <span data-processor="relativetime" data-value="2026-02-06T16:27:12+00:00" > 02/06/26, 16:27 </span>

    There are variants of that, which probably should only be logged with debug log-level:

    v14

    Fri, 06 Feb 2026 17:21:12 +0100 [ERROR] request="7154579010b13" component="TYPO3.CMS.Frontend.Middleware.PrepareTypoScriptFrontendRendering": No page configured for type=1. There is no TypoScript object of type PAGE with typeNum=1. - {"type":"1"}

    v12

    https://github.com/TYPO3/typo3/blob/790a252209cc279efda4d1e8338be123c87da1f8/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php#L1516 (even with log-level alert)

  4. Anton Danilov commented <span data-processor="relativetime" data-value="2026-08-11T14:24:40+00:00" > 08/11/26, 14:24 </span>

    I propose to distinguish between the two fundamentally different situations:

    1. type=0 – missing default page type
    type=0 is the mandatory default representation of a page. If there is no matching PAGE object with typeNum=0, the entire site is fundamentally broken – no page can render. This is a server misconfiguration, not a regular client request. The correct response is 500 Internal Server Error, and high‑severity logging is appropriate to alert the administrator immediately.

    2. type>0 or any string – missing optional representation
    Requests with a non‑zero type ask for a specific rendering variant that the site may offer. If that variant doesn’t exist, the resource in that representation is simply not available. The correct response is 404 Not Found, and no error‑level log entry should be written (handled via the existing configurable 404 handling).

    I think that redirecting in the core is not correct – a 404 is the appropriate status when a requested type variant doesn’t exist. However, a redirect can still be achieved by site integrators using a custom page error handler.

    If this approach is accepted, I’m happy to create a patch.

  5. Gerrit Code Review pushed patch set 1 for main to change 95604 status Accepted Under Review <span data-processor="relativetime" data-value="2026-09-03T13:02:14+00:00" > 09/03/26, 13:02 </span>

  6. Anton Danilov commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-01T08:20:10+00:00" > 10/01/26, 08:20 </span>

    Applied in changeset commit:65494625c63676a7580a6fd24c2cb047a3e428d2.