Project

General

Profile

Actions

Bug #88090

closed

TYPO3\CMS\Core\Error\Http\PageNotFoundException after Upgrade to TYPO3 9.5.5

Added by Kurt Gusbeth over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2019-04-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have updated from TYPO3 8 to 9 and since then I always get errors in the FE, even there are no errors or warnings in the backend.
Environment Status: everything green. Site Configuration: all done. Upgrade Wizard: done.
Nevertheless nothings works. Rootpage without parameters (http://www.mydomain.de/):

(1/1) #1518472189 TYPO3\CMS\Core\Error\Http\PageNotFoundException

The requested page does not exist
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Controller/ErrorController.php line 82

            $response = $errorHandler->handlePageError($request, $message, $reasons);
            return $response->withStatus(404, $message);
        }
        if (!$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling']) {
            throw new PageNotFoundException($message, 1518472189);
        }
        return $this->handlePageError(
            $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'],
            $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_statheader'],

at TYPO3\CMS\Frontend\Controller\ErrorController->pageNotFoundAction(object(TYPO3\CMS\Core\Http\ServerRequest), 'The requested page does not exist', array('code' => 'page'))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/PageResolver.php line 108

                } catch (RouteNotFoundException $e) {
                    return GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
                        $request,
                        'The requested page does not exist',
                        ['code' => PageAccessFailureReasons::PAGE_NOT_FOUND]
                    );
                }
            }
            if (!$pageArguments->getPageId()) {

at TYPO3\CMS\Frontend\Middleware\PageResolver->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php line 66

                return new HtmlResponse($content, 200, ['Content-Type' => $contentType]);
            }
        }
        return $handler->handle($request);
    }

    /**
     * @param File $file

at TYPO3\CMS\Frontend\Middleware\StaticRouteResolver->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php line 80

                $uri = $requestedUri->withPath($requestedUri->getPath() . '/');
                return new RedirectResponse($uri, 307);
            }
        }
        return $handler->handle($request);
    }
    /**
     * Checks if the language is allowed in Frontend, if not, check if there is valid BE user
     *

at TYPO3\CMS\Frontend\Middleware\SiteBaseRedirectResolver->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/SiteResolver.php line 68

        // At this point, we later get further route modifiers
        // for bw-compat we update $GLOBALS[TYPO3_REQUEST] to be used later in TSFE.
        $GLOBALS['TYPO3_REQUEST'] = $request;

        return $handler->handle($request);
    }
}

at TYPO3\CMS\Frontend\Middleware\SiteResolver->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php line 95

            Bootstrap::loadExtTables();
            $this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), $GLOBALS['BE_USER']);
        }

        return $handler->handle($request);
    }

    /**
     * Creates the backend user object and returns it.

at TYPO3\CMS\Frontend\Middleware\BackendUserAuthenticator->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php line 79

        // Register the frontend user as aspect
        $this->setFrontendUserAspect(GeneralUtility::makeInstance(Context::class), $frontendUser);

        return $handler->handle($request);
    }

    /**
     * It's possible to transfer a frontend user session via a GET/POST parameter 'FE_SESSION_KEY'.

at TYPO3\CMS\Frontend\Middleware\FrontendUserAuthenticator->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php line 91

                GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']);
            }
        }

        return $handler->handle($request);
    }
}

at TYPO3\CMS\Frontend\Middleware\TypoScriptFrontendInitialization->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/EidHandler.php line 50

    {
        $eID = $request->getParsedBody()['eID'] ?? $request->getQueryParams()['eID'] ?? null;

        if ($eID === null) {
            return $handler->handle($request);
        }

        // Remove any output produced until now
        ob_clean();

at TYPO3\CMS\Frontend\Middleware\EidHandler->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/PreprocessRequestHook.php line 57

                $hookParameters = [];
                GeneralUtility::callUserFunction($hookFunction, $hookParameters, $hookParameters);
            }
        }
        return $handler->handle($request);
    }
}

at TYPO3\CMS\Frontend\Middleware\PreprocessRequestHook->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php line 58

        // refactored to have ServerRequest object available where it is needed. This global will be
        // deprecated then and removed.
        $GLOBALS['TYPO3_REQUEST'] = $request;

        return $handler->handle($request);
    }
}

at TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Middleware/TimeTrackerInitialization.php line 49

        );
        $timeTracker->start();
        $timeTracker->push('');

        return $handler->handle($request);
    }
}

at TYPO3\CMS\Frontend\Middleware\TimeTrackerInitialization->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 138

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}

at class@anonymous/var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f73ebe91056->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 67

     * @return ResponseInterface
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        return $this->tip->handle($request);
    }

    /**
     * Seed the middleware stack with the inner request handler

at TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/AbstractApplication.php line 98

    {
        $requestHandler = GeneralUtility::makeInstance($this->requestHandler);
        $dispatcher = $this->createMiddlewareDispatcher($requestHandler);

        return $dispatcher->handle($request);
    }

    /**
     * Set up the application and shut it down afterwards

at TYPO3\CMS\Core\Http\AbstractApplication->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/frontend/Classes/Http/Application.php line 69

        if (!$this->checkIfEssentialConfigurationExists()) {
            return $this->installToolRedirect();
        }
        $this->initializeContext();
        return parent::handle($request);
    }

    /**
     * Check if LocalConfiguration.php and PackageStates.php exist

at TYPO3\CMS\Frontend\Http\Application->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/typo3_src-9.5.5/typo3/sysext/core/Classes/Http/AbstractApplication.php line 110

    final public function run(callable $execute = null)
    {
        try {
            $response = $this->handle(
                \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals()
            );
            if ($execute !== null) {
                call_user_func($execute);
            }

at TYPO3\CMS\Core\Http\AbstractApplication->run()
in /var/www/html/typo3_src-9.5.5/index.php line 24

// Set up the application for the frontend
call_user_func(function () {
    $classLoader = require __DIR__.'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run();
});

at {closure}()
in /var/www/html/typo3_src-9.5.5/index.php line 25

call_user_func(function () {
    $classLoader = require __DIR__.'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run();
});

Any other page (e.g. http:///www.mydomain.de/kontakt):

Not Found

The requested URL /kontakt was not found on this server.

Why? There is absolutely no warning in the backend.

Actions

Also available in: Atom PDF