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.
return new TableExistsException($exception, $query); case 1051: case 1146: return new TableNotFoundException($exception, $query); case 1216: case 1217: case 1451:
Driver\Exception $driverException, ?Query $query ): DriverException { $this->exceptionConverter ??= $this->_driver->getExceptionConverter(); $exception = $this->exceptionConverter->convert($driverException, $query); if ($exception instanceof ConnectionLost) { $this->close(); }
string $sql, array $params = [], array $types = [] ): DriverException { return $this->handleDriverException($e, new Query($sql, $params, $types)); } /** @internal */ final public function convertException(Driver\Exception $e): DriverException
} return new Result($result, $this); } catch (Driver\Exception $e) { throw $this->convertExceptionDuringQuery($e, $sql, $params, $types); } finally { if ($logger !== null) { $logger->stopQuery(); }
* @throws Exception */ public function executeQuery(): Result { return $this->connection->executeQuery( $this->getSQL(), $this->params, $this->paramTypes, $this->resultCacheProfile,
{ // Set additional query restrictions $originalWhereConditions = $this->addAdditionalWhereConditions(); $result = $this->concreteQueryBuilder->executeQuery(); // Restore the original query conditions in case the user keeps // on modifying the state. $this->concreteQueryBuilder->add('where', $originalWhereConditions, false);
$results = $queryBuilder ->select(...$this->persistenceFieldNames) ->where(...$constraints) ->executeQuery() ->fetchAllAssociative(); // limit results to be contained in rootPageId of current Site // (which is defining the route configuration currently being processed) if ($this->slugUniqueInSite) {
*/ public function resolve(string $value): ?string { $value = $this->routeValuePrefix . $this->purgeRouteValuePrefix($value); $result = $this->findByRouteFieldValue($value); if (($result[$this->languageParentFieldName] ?? null) > 0) { return (string)$result[$this->languageParentFieldName]; } if (isset($result['uid'])) {
} $values = []; foreach ($mappers as $variableName => $mapper) { $value = $mapper->resolve( (string)($attributes[$variableName] ?? '') ); if ($value === null) { if (!$mapper instanceof UnresolvedValueInterface || !$mapper->hasFallbackValue()) {
continue; } // custom handling of Mappable instances if (!$this->mappableProcessor->resolve($route, $matches)) { continue; } return $this->getAttributes($route, $name, $matches);
* @throws ResourceNotFoundException */ public function match(string $urlPath) { if ($ret = $this->matchCollection(rawurldecode($urlPath), $this->routes)) { return $ret; } throw new ResourceNotFoundException( sprintf('No routes found for "%s".', $urlPath),
} $matcher = new PageUriMatcher($fullCollection); try { $result = $matcher->match($prefixedUrlPath); /** @var Route $matchedRoute */ $matchedRoute = $fullCollection->get($result['_route']); // Only use route if page language variant matches current language, otherwise handle it as route not found. if ($this->isRouteReallyValidForLanguage($matchedRoute, $language)) {
// Check for the route arguments or Query Parameter ID try { /** @var PageArguments $pageArguments */ $pageArguments = $site->getRouter()->matchRequest($request, $previousResult); $request = $request->withAttribute('routing', $pageArguments); } catch (RouteNotFoundException $e) { return GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction( $request,
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$addInformationAboutDisabledCache = true; $setCookieOnCurrentRequest = false; } $response = $handler->handle($request); $tsfe = $this->getTypoScriptFrontendController(); if ($tsfe !== null && $addInformationAboutDisabledCache) { $tsfe->set_no_cache('GET Parameter ADMCMD_prev=LIVE was given', true);
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); } }; } }
MainController::class ); $request = $adminPanelController->initialize($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); } }; } }
// @todo create report, then call persist, then dispatch new event $this->persistCspReport($scope, $request); return new NullResponse(); } 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); } }; } }
$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); } }; } }
); // If the matched redirect is found, resolve it, and check further if (!is_array($matchedRedirect)) { return $handler->handle($request); } $url = $this->redirectService->getTargetUrl($matchedRedirect, $request); if ($url === null) { 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); } }; } }
if ($this->context->getAspect('frontend.user')->isLoggedIn() && $rateLimiter) { $rateLimiter->reset(); } $response = $handler->handle($request); // Store session data for fe_users if it still exists if ($frontendUser instanceof FrontendUserAuthentication) { $frontendUser->storeSessionData();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$request = $request->withAttribute('noCache', true); } } $response = $handler->handle($request); // If, when building the response, the user is still available, then ensure that the headers are sent properly if ($this->context->getAspect('backend.user')->isLoggedIn()) { return $this->applyHeadersToResponse($response);
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->securityAspect->setReceivedRequestToken(false); $this->logger->debug('Could not resolve request token', ['exception' => $exception]); } $response = $handler->handle($request); return $this->enrichResponseWithCookie($request, $response); } protected function resolveNoncePool(ServerRequestInterface $request): NoncePool
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
) { return GeneralUtility::makeInstance(ErrorController::class)->unavailableAction($request, 'This page is temporarily unavailable.'); } // Continue the regular stack if no maintenance mode is active 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); } }; } }
$request = $request->withAttribute('routing', $routeResult); if ($routeResult->getLanguage() instanceof SiteLanguage) { Locales::setSystemLocaleFromSiteLanguage($routeResult->getLanguage()); } 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); } }; } }
*/ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($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); } }; } }
1396795884 ); } return $handler->handle($request); } /** * Checks if the provided host header value matches the trusted hosts pattern.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->timeTracker->setEnabled($timeTrackingEnabled); $this->timeTracker->start(microtime(true)); $this->timeTracker->push(''); $response = $handler->handle($request); // Finish time tracking $this->timeTracker->pull(); $this->timeTracker->finish();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* Invoke the middleware stack */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
public function handle(ServerRequestInterface $request): ResponseInterface { try { $response = $this->requestHandler->handle($request); } catch (ImmediateResponseException $exception) { $response = $exception->getResponse(); } return $response;
// Create new request object having applicationType "I am a frontend request" attribute. $request = $request->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE); $this->initializeContext(); return parent::handle($request); } /** * Create a PSR-7 Response that redirects to the install tool
* Set up the application and shut it down afterwards */ final public function run() { $response = $this->handle(ServerRequestFactory::fromGlobals()); $this->sendResponse($response); } }
// Set up the application for the frontend call_user_func(static function () { $classLoader = require dirname(__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(static function () { $classLoader = require dirname(__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(); });
{ $p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate'); $p->setAccessible(true); return new self($exception->getMessage(), $p->getValue($exception), (int) $exception->getCode(), $exception); } }
{ try { $stmt = $this->connection->prepare($sql); } catch (mysqli_sql_exception $e) { throw ConnectionError::upcast($e); } if ($stmt === false) { throw ConnectionError::new($this->connection);
} public function prepare(string $sql): Statement { return $this->wrappedConnection->prepare($sql); } public function query(string $sql): Result {
} public function prepare(string $sql): DriverStatement { return new LoggingStatement(parent::prepare($sql), $this->logger, $sql); } public function query(string $sql): Result {
if ($this->needsArrayParameterConversion($params, $types)) { [$sql, $params, $types] = $this->expandArrayParameters($sql, $params, $types); } $stmt = $connection->prepare($sql); $this->bindParameters($stmt, $params, $types); $result = $stmt->execute();
* @throws Exception */ public function executeQuery(): Result { return $this->connection->executeQuery( $this->getSQL(), $this->params, $this->paramTypes, $this->resultCacheProfile,
{ // Set additional query restrictions $originalWhereConditions = $this->addAdditionalWhereConditions(); $result = $this->concreteQueryBuilder->executeQuery(); // Restore the original query conditions in case the user keeps // on modifying the state. $this->concreteQueryBuilder->add('where', $originalWhereConditions, false);
$results = $queryBuilder ->select(...$this->persistenceFieldNames) ->where(...$constraints) ->executeQuery() ->fetchAllAssociative(); // limit results to be contained in rootPageId of current Site // (which is defining the route configuration currently being processed) if ($this->slugUniqueInSite) {
*/ public function resolve(string $value): ?string { $value = $this->routeValuePrefix . $this->purgeRouteValuePrefix($value); $result = $this->findByRouteFieldValue($value); if (($result[$this->languageParentFieldName] ?? null) > 0) { return (string)$result[$this->languageParentFieldName]; } if (isset($result['uid'])) {
} $values = []; foreach ($mappers as $variableName => $mapper) { $value = $mapper->resolve( (string)($attributes[$variableName] ?? '') ); if ($value === null) { if (!$mapper instanceof UnresolvedValueInterface || !$mapper->hasFallbackValue()) {
continue; } // custom handling of Mappable instances if (!$this->mappableProcessor->resolve($route, $matches)) { continue; } return $this->getAttributes($route, $name, $matches);
* @throws ResourceNotFoundException */ public function match(string $urlPath) { if ($ret = $this->matchCollection(rawurldecode($urlPath), $this->routes)) { return $ret; } throw new ResourceNotFoundException( sprintf('No routes found for "%s".', $urlPath),
} $matcher = new PageUriMatcher($fullCollection); try { $result = $matcher->match($prefixedUrlPath); /** @var Route $matchedRoute */ $matchedRoute = $fullCollection->get($result['_route']); // Only use route if page language variant matches current language, otherwise handle it as route not found. if ($this->isRouteReallyValidForLanguage($matchedRoute, $language)) {
// Check for the route arguments or Query Parameter ID try { /** @var PageArguments $pageArguments */ $pageArguments = $site->getRouter()->matchRequest($request, $previousResult); $request = $request->withAttribute('routing', $pageArguments); } catch (RouteNotFoundException $e) { return GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction( $request,
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$addInformationAboutDisabledCache = true; $setCookieOnCurrentRequest = false; } $response = $handler->handle($request); $tsfe = $this->getTypoScriptFrontendController(); if ($tsfe !== null && $addInformationAboutDisabledCache) { $tsfe->set_no_cache('GET Parameter ADMCMD_prev=LIVE was given', true);
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); } }; } }
MainController::class ); $request = $adminPanelController->initialize($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); } }; } }
// @todo create report, then call persist, then dispatch new event $this->persistCspReport($scope, $request); return new NullResponse(); } 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); } }; } }
$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); } }; } }
); // If the matched redirect is found, resolve it, and check further if (!is_array($matchedRedirect)) { return $handler->handle($request); } $url = $this->redirectService->getTargetUrl($matchedRedirect, $request); if ($url === null) { 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); } }; } }
if ($this->context->getAspect('frontend.user')->isLoggedIn() && $rateLimiter) { $rateLimiter->reset(); } $response = $handler->handle($request); // Store session data for fe_users if it still exists if ($frontendUser instanceof FrontendUserAuthentication) { $frontendUser->storeSessionData();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$request = $request->withAttribute('noCache', true); } } $response = $handler->handle($request); // If, when building the response, the user is still available, then ensure that the headers are sent properly if ($this->context->getAspect('backend.user')->isLoggedIn()) { return $this->applyHeadersToResponse($response);
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->securityAspect->setReceivedRequestToken(false); $this->logger->debug('Could not resolve request token', ['exception' => $exception]); } $response = $handler->handle($request); return $this->enrichResponseWithCookie($request, $response); } protected function resolveNoncePool(ServerRequestInterface $request): NoncePool
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
) { return GeneralUtility::makeInstance(ErrorController::class)->unavailableAction($request, 'This page is temporarily unavailable.'); } // Continue the regular stack if no maintenance mode is active 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); } }; } }
$request = $request->withAttribute('routing', $routeResult); if ($routeResult->getLanguage() instanceof SiteLanguage) { Locales::setSystemLocaleFromSiteLanguage($routeResult->getLanguage()); } 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); } }; } }
*/ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($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); } }; } }
1396795884 ); } return $handler->handle($request); } /** * Checks if the provided host header value matches the trusted hosts pattern.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->timeTracker->setEnabled($timeTrackingEnabled); $this->timeTracker->start(microtime(true)); $this->timeTracker->push(''); $response = $handler->handle($request); // Finish time tracking $this->timeTracker->pull(); $this->timeTracker->finish();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* Invoke the middleware stack */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
public function handle(ServerRequestInterface $request): ResponseInterface { try { $response = $this->requestHandler->handle($request); } catch (ImmediateResponseException $exception) { $response = $exception->getResponse(); } return $response;
// Create new request object having applicationType "I am a frontend request" attribute. $request = $request->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE); $this->initializeContext(); return parent::handle($request); } /** * Create a PSR-7 Response that redirects to the install tool
* Set up the application and shut it down afterwards */ final public function run() { $response = $this->handle(ServerRequestFactory::fromGlobals()); $this->sendResponse($response); } }
// Set up the application for the frontend call_user_func(static function () { $classLoader = require dirname(__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(static function () { $classLoader = require dirname(__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(); });
public function prepare(string $sql): DriverStatement { try { $stmt = $this->connection->prepare($sql); } catch (mysqli_sql_exception $e) { throw ConnectionError::upcast($e); }
public function prepare(string $sql): DriverStatement { try { $stmt = $this->connection->prepare($sql); } catch (mysqli_sql_exception $e) { throw ConnectionError::upcast($e); }
} public function prepare(string $sql): Statement { return $this->wrappedConnection->prepare($sql); } public function query(string $sql): Result {
} public function prepare(string $sql): DriverStatement { return new LoggingStatement(parent::prepare($sql), $this->logger, $sql); } public function query(string $sql): Result {
if ($this->needsArrayParameterConversion($params, $types)) { [$sql, $params, $types] = $this->expandArrayParameters($sql, $params, $types); } $stmt = $connection->prepare($sql); $this->bindParameters($stmt, $params, $types); $result = $stmt->execute();
* @throws Exception */ public function executeQuery(): Result { return $this->connection->executeQuery( $this->getSQL(), $this->params, $this->paramTypes, $this->resultCacheProfile,
{ // Set additional query restrictions $originalWhereConditions = $this->addAdditionalWhereConditions(); $result = $this->concreteQueryBuilder->executeQuery(); // Restore the original query conditions in case the user keeps // on modifying the state. $this->concreteQueryBuilder->add('where', $originalWhereConditions, false);
$results = $queryBuilder ->select(...$this->persistenceFieldNames) ->where(...$constraints) ->executeQuery() ->fetchAllAssociative(); // limit results to be contained in rootPageId of current Site // (which is defining the route configuration currently being processed) if ($this->slugUniqueInSite) {
*/ public function resolve(string $value): ?string { $value = $this->routeValuePrefix . $this->purgeRouteValuePrefix($value); $result = $this->findByRouteFieldValue($value); if (($result[$this->languageParentFieldName] ?? null) > 0) { return (string)$result[$this->languageParentFieldName]; } if (isset($result['uid'])) {
} $values = []; foreach ($mappers as $variableName => $mapper) { $value = $mapper->resolve( (string)($attributes[$variableName] ?? '') ); if ($value === null) { if (!$mapper instanceof UnresolvedValueInterface || !$mapper->hasFallbackValue()) {
continue; } // custom handling of Mappable instances if (!$this->mappableProcessor->resolve($route, $matches)) { continue; } return $this->getAttributes($route, $name, $matches);
* @throws ResourceNotFoundException */ public function match(string $urlPath) { if ($ret = $this->matchCollection(rawurldecode($urlPath), $this->routes)) { return $ret; } throw new ResourceNotFoundException( sprintf('No routes found for "%s".', $urlPath),
} $matcher = new PageUriMatcher($fullCollection); try { $result = $matcher->match($prefixedUrlPath); /** @var Route $matchedRoute */ $matchedRoute = $fullCollection->get($result['_route']); // Only use route if page language variant matches current language, otherwise handle it as route not found. if ($this->isRouteReallyValidForLanguage($matchedRoute, $language)) {
// Check for the route arguments or Query Parameter ID try { /** @var PageArguments $pageArguments */ $pageArguments = $site->getRouter()->matchRequest($request, $previousResult); $request = $request->withAttribute('routing', $pageArguments); } catch (RouteNotFoundException $e) { return GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction( $request,
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$addInformationAboutDisabledCache = true; $setCookieOnCurrentRequest = false; } $response = $handler->handle($request); $tsfe = $this->getTypoScriptFrontendController(); if ($tsfe !== null && $addInformationAboutDisabledCache) { $tsfe->set_no_cache('GET Parameter ADMCMD_prev=LIVE was given', true);
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); } }; } }
MainController::class ); $request = $adminPanelController->initialize($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); } }; } }
// @todo create report, then call persist, then dispatch new event $this->persistCspReport($scope, $request); return new NullResponse(); } 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); } }; } }
$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); } }; } }
); // If the matched redirect is found, resolve it, and check further if (!is_array($matchedRedirect)) { return $handler->handle($request); } $url = $this->redirectService->getTargetUrl($matchedRedirect, $request); if ($url === null) { 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); } }; } }
if ($this->context->getAspect('frontend.user')->isLoggedIn() && $rateLimiter) { $rateLimiter->reset(); } $response = $handler->handle($request); // Store session data for fe_users if it still exists if ($frontendUser instanceof FrontendUserAuthentication) { $frontendUser->storeSessionData();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$request = $request->withAttribute('noCache', true); } } $response = $handler->handle($request); // If, when building the response, the user is still available, then ensure that the headers are sent properly if ($this->context->getAspect('backend.user')->isLoggedIn()) { return $this->applyHeadersToResponse($response);
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->securityAspect->setReceivedRequestToken(false); $this->logger->debug('Could not resolve request token', ['exception' => $exception]); } $response = $handler->handle($request); return $this->enrichResponseWithCookie($request, $response); } protected function resolveNoncePool(ServerRequestInterface $request): NoncePool
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
) { return GeneralUtility::makeInstance(ErrorController::class)->unavailableAction($request, 'This page is temporarily unavailable.'); } // Continue the regular stack if no maintenance mode is active 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); } }; } }
$request = $request->withAttribute('routing', $routeResult); if ($routeResult->getLanguage() instanceof SiteLanguage) { Locales::setSystemLocaleFromSiteLanguage($routeResult->getLanguage()); } 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); } }; } }
*/ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($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); } }; } }
1396795884 ); } return $handler->handle($request); } /** * Checks if the provided host header value matches the trusted hosts pattern.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->timeTracker->setEnabled($timeTrackingEnabled); $this->timeTracker->start(microtime(true)); $this->timeTracker->push(''); $response = $handler->handle($request); // Finish time tracking $this->timeTracker->pull(); $this->timeTracker->finish();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* Invoke the middleware stack */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
public function handle(ServerRequestInterface $request): ResponseInterface { try { $response = $this->requestHandler->handle($request); } catch (ImmediateResponseException $exception) { $response = $exception->getResponse(); } return $response;
// Create new request object having applicationType "I am a frontend request" attribute. $request = $request->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE); $this->initializeContext(); return parent::handle($request); } /** * Create a PSR-7 Response that redirects to the install tool
* Set up the application and shut it down afterwards */ final public function run() { $response = $this->handle(ServerRequestFactory::fromGlobals()); $this->sendResponse($response); } }
// Set up the application for the frontend call_user_func(static function () { $classLoader = require dirname(__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(static function () { $classLoader = require dirname(__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(); });