If you need help solving this exception, you can have a look at the TYPO3 Documentation. There you can find solutions provided by the TYPO3 community. Once you have found a solution to the problem, help others by contributing to the documentation page.
Find a solution for this exception in the TYPO3 Documentation.
]; try { $content = GeneralUtility::callUserFunction($funcRef, $params, $this); } catch (\Exception $e) { throw new \RuntimeException('Error: 404 page by USER_FUNCTION "' . $funcRef . '" failed.', 1518472235, $e); } } elseif (GeneralUtility::isFirstPartOfStr($errorHandler, 'READFILE:')) { $readFile = GeneralUtility::getFileAbsFileName(trim(substr($errorHandler, 9))); if (@is_file($readFile)) {
return $this->handlePageError( $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'], $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_accessdeniedheader'], $message, $reasons ); } /**
case 1: $response = GeneralUtility::makeInstance(ErrorController::class)->accessDeniedAction( $GLOBALS['TYPO3_REQUEST'], 'ID was not an accessible page', $this->getPageAccessFailureReasons(PageAccessFailureReasons::ACCESS_DENIED_PAGE_NOT_RESOLVED) ); break; case 2: $response = GeneralUtility::makeInstance(ErrorController::class)->accessDeniedAction(
if ($isPreview) { $this->disableCache(); } // Now, get the id, validate access etc: $this->fetch_the_id(); // Check if backend user has read access to this page. If not, recalculate the id. if ($this->isBackendUserLoggedIn() && $isPreview && !$this->getBackendUser()->doesUserHaveAccess($this->page, Permission::PAGE_SHOW)) { // Resetting $this->clear_preview();
$this->checkAlternativeIdMethods($this->controller); } } $this->controller->determineId(); // No access? Then remove user & Re-evaluate the page-id if ($this->controller->isBackendUserLoggedIn() && !$GLOBALS['BE_USER']->doesUserHaveAccess($this->controller->page, Permission::PAGE_SHOW)) { unset($GLOBALS['BE_USER']);
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$jsonCompatibilityConverter = GeneralUtility::makeInstance(JsonCompatibilityConverter::class); $crawlerInformation = $request->getHeaderLine($this->headerName) ?? null; if (empty($crawlerInformation)) { return $handler->handle($request); } // Authenticate crawler request: //@todo: ask service to exclude current call for special reasons: for example no relevance because the language version is not affected
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$showHiddenRecords = ($this->context->hasAspect('visibility') ? $this->context->getAspect('visibility')->includeHidden() : false); $GLOBALS['TSFE']->fePreview = ($simulatingDate || $simulatingGroup || $showHiddenRecords); } return $handler->handle($request); } /** * Simulate dates for preview functionality
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$uri = $requestedUri->withPath(rtrim($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 *
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return $response; } } return $handler->handle($request); } /** * Creates a PSR-7 compatible Response object
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return new HtmlResponse($content, 200, ['Content-Type' => $contentType]); } } return $handler->handle($request); } /** * Find the proper configuration for the static route in the static route configuration. Mainly:
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// 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); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
Bootstrap::loadExtTables(); $this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), $GLOBALS['BE_USER']); } return $handler->handle($request); } /** * Creates the backend user object and returns it.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// 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'.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']); } } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
{ $eID = $request->getParsedBody()['eID'] ?? $request->getQueryParams()['eID'] ?? null; if ($eID === null) { return $handler->handle($request); } // Remove any output produced until now ob_clean();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$hookParameters = []; GeneralUtility::callUserFunction($hookFunction, $hookParameters, $hookParameters); } } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// 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); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
); $timeTracker->start(); $timeTracker->push(''); return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
{ $requestHandler = GeneralUtility::makeInstance($this->requestHandler); $dispatcher = $this->createMiddlewareDispatcher($requestHandler); return $dispatcher->handle($request); } /** * Set up the application and shut it down afterwards
if (!$this->checkIfEssentialConfigurationExists()) { return $this->installToolRedirect(); } $this->initializeContext(); return parent::handle($request); } /** * Check if LocalConfiguration.php and PackageStates.php exist
final public function run(callable $execute = null) { try { $response = $this->handle( \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals() ); if ($execute !== null) { call_user_func($execute); }
// 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(); });
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(); });
throw new \InvalidArgumentException($errorMsg, 1294585865); } } else { $errorMsg = 'No class named ' . $parts[0]; throw new \InvalidArgumentException($errorMsg, 1294585866); } } elseif (function_exists($funcName)) { // It's a function $content = call_user_func_array($funcName, [&$params, &$ref]);
'reasonText' => $reason, 'pageAccessFailureReasons' => $pageAccessFailureReasons ]; try { $content = GeneralUtility::callUserFunction($funcRef, $params, $this); } catch (\Exception $e) { throw new \RuntimeException('Error: 404 page by USER_FUNCTION "' . $funcRef . '" failed.', 1518472235, $e); } } elseif (GeneralUtility::isFirstPartOfStr($errorHandler, 'READFILE:')) {
return $this->handlePageError( $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'], $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_accessdeniedheader'], $message, $reasons ); } /**
case 1: $response = GeneralUtility::makeInstance(ErrorController::class)->accessDeniedAction( $GLOBALS['TYPO3_REQUEST'], 'ID was not an accessible page', $this->getPageAccessFailureReasons(PageAccessFailureReasons::ACCESS_DENIED_PAGE_NOT_RESOLVED) ); break; case 2: $response = GeneralUtility::makeInstance(ErrorController::class)->accessDeniedAction(
if ($isPreview) { $this->disableCache(); } // Now, get the id, validate access etc: $this->fetch_the_id(); // Check if backend user has read access to this page. If not, recalculate the id. if ($this->isBackendUserLoggedIn() && $isPreview && !$this->getBackendUser()->doesUserHaveAccess($this->page, Permission::PAGE_SHOW)) { // Resetting $this->clear_preview();
$this->checkAlternativeIdMethods($this->controller); } } $this->controller->determineId(); // No access? Then remove user & Re-evaluate the page-id if ($this->controller->isBackendUserLoggedIn() && !$GLOBALS['BE_USER']->doesUserHaveAccess($this->controller->page, Permission::PAGE_SHOW)) { unset($GLOBALS['BE_USER']);
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$jsonCompatibilityConverter = GeneralUtility::makeInstance(JsonCompatibilityConverter::class); $crawlerInformation = $request->getHeaderLine($this->headerName) ?? null; if (empty($crawlerInformation)) { return $handler->handle($request); } // Authenticate crawler request: //@todo: ask service to exclude current call for special reasons: for example no relevance because the language version is not affected
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$showHiddenRecords = ($this->context->hasAspect('visibility') ? $this->context->getAspect('visibility')->includeHidden() : false); $GLOBALS['TSFE']->fePreview = ($simulatingDate || $simulatingGroup || $showHiddenRecords); } return $handler->handle($request); } /** * Simulate dates for preview functionality
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$uri = $requestedUri->withPath(rtrim($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 *
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return $response; } } return $handler->handle($request); } /** * Creates a PSR-7 compatible Response object
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return new HtmlResponse($content, 200, ['Content-Type' => $contentType]); } } return $handler->handle($request); } /** * Find the proper configuration for the static route in the static route configuration. Mainly:
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// 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); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
Bootstrap::loadExtTables(); $this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), $GLOBALS['BE_USER']); } return $handler->handle($request); } /** * Creates the backend user object and returns it.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// 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'.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']); } } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
{ $eID = $request->getParsedBody()['eID'] ?? $request->getQueryParams()['eID'] ?? null; if ($eID === null) { return $handler->handle($request); } // Remove any output produced until now ob_clean();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$hookParameters = []; GeneralUtility::callUserFunction($hookFunction, $hookParameters, $hookParameters); } } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// 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); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
); $timeTracker->start(); $timeTracker->push(''); return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
{ $requestHandler = GeneralUtility::makeInstance($this->requestHandler); $dispatcher = $this->createMiddlewareDispatcher($requestHandler); return $dispatcher->handle($request); } /** * Set up the application and shut it down afterwards
if (!$this->checkIfEssentialConfigurationExists()) { return $this->installToolRedirect(); } $this->initializeContext(); return parent::handle($request); } /** * Check if LocalConfiguration.php and PackageStates.php exist
final public function run(callable $execute = null) { try { $response = $this->handle( \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals() ); if ($execute !== null) { call_user_func($execute); }
// 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(); });
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(); });