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.
if (strlen($hash) < 31) { return $hash; } if (!isset($this->hashes[$hash])) { throw new \OutOfRangeException( 'Hash not resolvable', 1537633463 ); }
protected function inflateArray(array $array, ?string $namespace, array $arguments): array { $result = []; foreach ($array as $key => $value) { $inflatedKey = $this->resolveHash((string)$key); // inflate nested values `namespace__any__nested` -> `namespace__any/nested` $inflatedKey = $this->inflateNestedValue($inflatedKey, $namespace, $arguments); $steps = explode(static::LEVEL_DELIMITER, $inflatedKey); $pointer = &$result;
if (empty($namespace) || empty($parameters)) { return $parameters; } $parameters = $this->inflateArray($parameters, $namespace, $arguments); // apply argument mapping on items of inflated namespace parameters if (!empty($parameters[$namespace]) && !empty($arguments)) { $parameters[$namespace] = $this->inflateKeys($parameters[$namespace], null, $arguments, false); }
*/ public function inflateParameters(array $parameters, array $internals = []): array { $parameters = $this->getVariableProcessor() ->inflateNamespaceParameters($parameters, $this->namespace); $parameters[$this->namespace] = $parameters[$this->namespace] ?? []; // Invalid if there is no controller given, so this enhancers does not do anything if (empty($internals['_controller'] ?? null)) {
$appliedDefaults = $matchedRoute->getOption('_appliedDefaults') ?? []; parse_str($uri->getQuery() ?? '', $remainingQueryParameters); $enhancer = $route->getEnhancer(); if ($enhancer instanceof InflatableEnhancerInterface) { $remainingQueryParameters = $enhancer->inflateParameters($remainingQueryParameters); } $pageRouteResult = $this->buildPageArguments($route, array_merge($appliedDefaults, $parameters), $remainingQueryParameters); break; } catch (MissingMandatoryParametersException $e) {
$uri = $siteOfTargetPage->getRouter()->generateUri( $targetPageId, $queryParameters, $fragment, $useAbsoluteUrl ? RouterInterface::ABSOLUTE_URL : RouterInterface::ABSOLUTE_PATH ); } catch (InvalidRouteArgumentsException $e) { throw new UnableToLinkException('The target page could not be linked. Error: ' . $e->getMessage(), 1535472406); }
throw new UnableToLinkException('Link to external page "' . $page['uid'] . '" does not have a proper target URL, so "' . $linkText . '" was not linked.', 1551621999, null, $linkText); } } else { // Generate the URL $url = $this->generateUrlForPageWithSiteConfiguration($page, $siteOfTargetPage, $queryParameters, $sectionMark, $conf); // no scheme => always not external if (!$url->getScheme() || !$url->getHost()) { $treatAsExternalLink = false; } else {
$this, $tsfe ); try { [$this->lastTypoLinkUrl, $linkText, $target] = $linkBuilder->build($linkDetails, $linkText, $target, $conf); $this->lastTypoLinkTarget = htmlspecialchars($target); $this->lastTypoLinkLD['target'] = htmlspecialchars($target); $this->lastTypoLinkLD['totalUrl'] = $this->lastTypoLinkUrl; } catch (UnableToLinkException $e) {
* @see typoLink() */ public function typoLink_URL($conf) { $this->typoLink('|', $conf); return $this->lastTypoLinkUrl; } /**
'exclude' => implode( ',', CanonicalizationUtility::getParamsToExcludeForCanonicalizedUrl( (int)$this->typoScriptFrontendController->id, (array)$GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters'] ) ) ] ]);
$href = $this->checkForCanonicalLink(); } if (empty($href)) { // 3) Fallback, create canonical URL $href = $this->checkDefaultCanonical(); } if (!empty($href)) { $canonical = '<link ' . GeneralUtility::implodeAttributes([
$methodName = (string)$parts[1]; $callable = [$classObj, $methodName]; if (is_callable($callable)) { // Call method: $content = call_user_func_array($callable, [&$params, &$ref]); } else { $errorMsg = 'No method name \'' . $parts[1] . '\' in class ' . $parts[0]; throw new \InvalidArgumentException($errorMsg, 1294585865); }
// @internal hook for EXT:seo, will be gone soon, do not use it in your own extensions $_params = ['page' => $controller->page]; $_ref = null; foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags'] ?? [] as $_funcRef) { GeneralUtility::callUserFunction($_funcRef, $_params, $_ref); } $this->generateHrefLangTags($controller, $request); $this->generateMetaTagHtml(
if ($controller->config['config']['disableAllHeaderCode'] ?? false) { return $pageContent; } // Now, populate pageRenderer with all additional data $this->processHtmlBasedRenderingSettings($controller, $controller->getLanguage(), $request); $pageRenderer = $this->getPageRenderer(); // Add previously generated page content within the <body> tag afterwards $pageRenderer->addBodyContent(LF . $pageContent); if ($controller->isINTincScript()) {
// Content generation $this->timeTracker->incStackPointer(); $this->timeTracker->push($controller->sPre, 'PAGE'); $controller->content = $this->generatePageContent($controller, $request); $this->timeTracker->pull($this->timeTracker->LR ? $controller->content : ''); $this->timeTracker->decStackPointer();
// Throw away all output that may have happened during bootstrapping by weird extensions ob_clean(); // Initialize output compression if configured $this->initializeOutputCompression(); return $handler->handle($request); } /** * Initialize output compression if configured
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
class AssetInclusion implements MiddlewareInterface { public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); $body = $response->getBody(); $body->rewind(); $contents = $body->getContents();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
{ $frontendController = $GLOBALS['TSFE']; // check for default handling if (!$frontendController->isGeneratePage() || !isset($request->getQueryParams()[self::namespace])) { return $handler->handle($request); } // prepare rendering overwrite $frontendController->config['config']['debug'] = 0; $frontendController->config['config']['disableAllHeaderCode'] = 1;
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 process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting(true)
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 process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting(true)
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 process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting(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 RedirectResponse($externalUrl, 303); } } return $handler->handle($request); } protected function getRedirectUri(ServerRequestInterface $request): ?string {
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->convertCharsetRecursivelyToUtf8($parsedBody, $this->controller->metaCharset); $request = $request->withParsedBody($parsedBody); } } return $handler->handle($request); } /** * Small helper function to convert charsets for arrays to UTF-8
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
} // Make TSFE globally available $GLOBALS['TSFE'] = $controller; return $handler->handle($request); } /** * Register the backend user as aspect
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', $this->disableCache); return $handler->handle($request); } /** * Filters out the arguments that are necessary for calculating cHash
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$previewAspect = GeneralUtility::makeInstance(PreviewAspect::class, $isPreview); $this->context->setAspect('frontend.preview', $previewAspect); } 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); } }; } }
if (StateUtility::isActivatedForUser() && StateUtility::isOpen()) { $connection = $this->connectionPool->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME); $connection->getConfiguration()->setSQLLogger(GeneralUtility::makeInstance(DoctrineSqlLogger::class)); } 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); } }; } }
// merge the PageArguments with the request query parameters $queryParams = array_replace_recursive($request->getQueryParams(), $pageArguments->getArguments()); $request = $request->withQueryParams($queryParams); 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); } }; } }
unset($GLOBALS['TYPO3_REQUEST']); } } 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); } }; } }
$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); } }; } }
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); } }; } }
// Register the frontend user as aspect and within the session $this->setFrontendUserAspect($frontendUser); $request = $request->withAttribute('frontend.user', $frontendUser); $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); } }; } }
Bootstrap::loadExtTables(); $this->setBackendUserAspect($GLOBALS['BE_USER']); } $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); } }; } }
) { 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); } }; } }
$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); } }; } }
* @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
* @return ResponseInterface */ protected function handle(ServerRequestInterface $request): ResponseInterface { return $this->requestHandler->handle($request); } /** * Set up the application and shut it down afterwards
// 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); } /** * Check if LocalConfiguration.php and PackageStates.php exist
final public function run(callable $execute = null) { try { $response = $this->handle( 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(); });