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( $pageObject, $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, $fragment, $conf); // no scheme => always not external if (!$url->getScheme() || !$url->getHost()) { $treatAsExternalLink = false; } else {
// records set links. $tsfe instanceof TypoScriptFrontendController ? $tsfe : null ); try { $linkedResult = $linkBuilder->build($linkDetails, $linkText, $target, $conf); // Legacy layer, can be removed in TYPO3 v12.0. if (!($linkedResult instanceof LinkResultInterface)) { if (is_array($linkedResult)) { [$url, $linkText, $target] = $linkedResult;
* @return string The processed input value */ public function stdWrap_typolink($content = '', $conf = []) { return $this->typoLink($content, $conf['typolink.']); } /** * wrap
$isExecuted[$functionName] = true; $isExecuted[$functionProperties] = true; // Call the function with the prefix stdWrap_ to make sure nobody can execute functions just by adding their name to the TS Array $functionName = 'stdWrap_' . $functionName; $content = $this->{$functionName}($content, $singleConf); } elseif ($functionType === 'boolean' && !($conf[$functionName] ?? null)) { $isExecuted[$functionName] = true; $isExecuted[$functionProperties] = true; }
$content = $this->cObj->stdWrap($content, $conf['value.']); unset($conf['value.']); } if (!empty($conf)) { $content = $this->cObj->stdWrap($content, $conf); } return $content; } }
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
$timeTracker->decStackPointer(); } else { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } } if ($timeTracker->LR) { $timeTracker->pull($content);
if ($timeTracker->LR) { $timeTracker->push('/f:cObject/', '<' . $typoscriptObjectPath); } $timeTracker->incStackPointer(); $content = $contentObjectRenderer->cObjGetSingle($setup[$lastSegment], $setup[$lastSegment . '.'] ?? [], $typoscriptObjectPath); $timeTracker->decStackPointer(); if ($timeTracker->LR) { $timeTracker->pull($content); }
'No Content Object definition found at TypoScript object path "' . $typoscriptObjectPath . '"', 1540246570 ); } $content = self::renderContentObject($contentObjectRenderer, $setup, $typoscriptObjectPath, $lastSegment); if (!isset($GLOBALS['TSFE']) || !($GLOBALS['TSFE'] instanceof TypoScriptFrontendController)) { static::resetFrontendEnvironment(); } return $content;
'additionalAttributes' => NULL, 'data' => NULL, 'aria' => NULL, 'name' => NULL, 'value' => TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper::renderStatic($arguments3, $renderChildrenClosure4, $renderingContext), 'property' => $renderingContext->getVariableProvider()->getByPath('field.marker'), 'class' => NULL, 'dir' => NULL, 'id' => $output5,
$this->startRendering(self::RENDERING_PARTIAL, $parsedPartial, $renderingContext); if ($sectionName !== null) { $output = $this->renderSection($sectionName, $variables, $ignoreUnknown); } else { $output = $parsedPartial->render($renderingContext); } $this->stopRendering(); return $output; }
$renderingContext = clone $renderingContext; $renderingContext->getVariableProvider()->setSource($variables); $content = (new $delegate())->render($renderingContext); } elseif ($partial !== null) { $content = $view->renderPartial($partial, $section, $variables, $optional); } elseif ($section !== null) { $content = $view->renderSection($section, $variables, $optional); } elseif (!$optional) { throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial or delegate and optional flag is false');
'contentAs' => NULL, 'debug' => true, ]; $output11 .= TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments12, $renderChildrenClosure13, $renderingContext); $output11 .= ' '; return $output11;
if (isset($arguments['then'])) { return $arguments['then']; } if (isset($arguments['__then'])) { return $arguments['__then'](); } return ''; } if (!empty($arguments['__elseIf'])) {
return $output18; }, ]; $output3 .= TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper::renderStatic($arguments4, static fn() => '', $renderingContext) ; $output3 .= ' ';
$localVariableProvider->add($arguments['iteration'], $iterationData); $iterationData['index']++; $iterationData['cycle']++; } $output .= $renderChildrenClosure(); } $renderingContext->setVariableProvider($globalVariableProvider);
'reverse' => false, 'iteration' => NULL, ]; $output0 .= TYPO3Fluid\Fluid\ViewHelpers\ForViewHelper::renderStatic($arguments1, $renderChildrenClosure2, $renderingContext); $output0 .= ' </fieldset>
$this->startRendering(self::RENDERING_PARTIAL, $parsedPartial, $renderingContext); if ($sectionName !== null) { $output = $this->renderSection($sectionName, $variables, $ignoreUnknown); } else { $output = $parsedPartial->render($renderingContext); } $this->stopRendering(); return $output; }
$renderingContext = clone $renderingContext; $renderingContext->getVariableProvider()->setSource($variables); $content = (new $delegate())->render($renderingContext); } elseif ($partial !== null) { $content = $view->renderPartial($partial, $section, $variables, $optional); } elseif ($section !== null) { $content = $view->renderSection($section, $variables, $optional); } elseif (!$optional) { throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial or delegate and optional flag is false');
'contentAs' => NULL, 'debug' => true, ]; $output40 .= TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments41, $renderChildrenClosure42, $renderingContext); $output40 .= ' '; return $output40;
$localVariableProvider->add($arguments['iteration'], $iterationData); $iterationData['index']++; $iterationData['cycle']++; } $output .= $renderChildrenClosure(); } $renderingContext->setVariableProvider($globalVariableProvider);
'reverse' => false, 'iteration' => NULL, ]; $output35 .= TYPO3Fluid\Fluid\ViewHelpers\ForViewHelper::renderStatic($arguments38, $renderChildrenClosure39, $renderingContext); $output35 .= ' ';
public function renderChildren() { if ($this->renderChildrenClosure !== null) { $closure = $this->renderChildrenClosure; return $closure(); } return $this->viewHelperNode->evaluateChildNodes($this->renderingContext); }
$this->addFormObjectNameToViewHelperVariableContainer(); $this->addFormObjectToViewHelperVariableContainer(); $this->addFieldNamePrefixToViewHelperVariableContainer(); $this->addFormFieldNamesToViewHelperVariableContainer(); $formContent = $this->renderChildren(); if (isset($this->arguments['hiddenFieldClassName']) && $this->arguments['hiddenFieldClassName'] !== null) { $content = LF . '<div class="' . htmlspecialchars($this->arguments['hiddenFieldClassName']) . '">'; } else {
*/ protected function callRenderMethod() { if (method_exists($this, 'render')) { return call_user_func([$this, 'render']); } if ((new \ReflectionMethod($this, 'renderStatic'))->getDeclaringClass()->getName() !== AbstractViewHelper::class) { // Method is safe to call - will not recurse through ViewHelperInvoker via the default // implementation of renderStatic() on this class.
{ $this->validateArguments(); $this->initialize(); return $this->callRenderMethod(); } /** * Call the render() method and handle errors.
} $viewHelper->setRenderingContext($renderingContext); $viewHelper->setArguments($evaluatedArguments); $viewHelper->handleAdditionalArguments($undeclaredArguments); return $viewHelper->initializeArgumentsAndRender(); } catch (Exception $error) { return $renderingContext->getErrorHandler()->handleViewHelperError($error); } }
*/ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $viewHelperClassName = get_called_class(); return $renderingContext->getViewHelperInvoker()->invoke($viewHelperClassName, $arguments, $renderingContext, $renderChildrenClosure); } /** * Save the associated ViewHelper node in a static public class variable.
'tabindex' => NULL, 'onclick' => NULL, ]; $output22 .= TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::renderStatic($arguments23, $renderChildrenClosure24, $renderingContext); $output22 .= ' </div> ';
if (isset($arguments['then'])) { return $arguments['then']; } if (isset($arguments['__then'])) { return $arguments['__then'](); } return ''; } if (!empty($arguments['__elseIf'])) {
return $output48; }, ]; $output12 .= TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper::renderStatic($arguments19, static fn() => '', $renderingContext) ; $output12 .= ' ';
public function renderChildren() { if ($this->renderChildrenClosure !== null) { $closure = $this->renderChildrenClosure; return $closure(); } return $this->viewHelperNode->evaluateChildNodes($this->renderingContext); }
$variableContainer->add('settings', $this->componentSettings); // Provide component content to renderer if (!isset($this->arguments['content'])) { $this->arguments['content'] = (string)$this->renderChildren(); } // Provide supplied arguments from component call to renderer foreach ($this->arguments as $name => $argument) {
*/ protected function callRenderMethod() { if (method_exists($this, 'render')) { return call_user_func([$this, 'render']); } if ((new \ReflectionMethod($this, 'renderStatic'))->getDeclaringClass()->getName() !== AbstractViewHelper::class) { // Method is safe to call - will not recurse through ViewHelperInvoker via the default // implementation of renderStatic() on this class.
{ $this->validateArguments(); $this->initialize(); return $this->callRenderMethod(); } /** * Call the render() method and handle errors.
} $viewHelper->setRenderingContext($renderingContext); $viewHelper->setArguments($evaluatedArguments); $viewHelper->handleAdditionalArguments($undeclaredArguments); return $viewHelper->initializeArgumentsAndRender(); } catch (Exception $error) { return $renderingContext->getErrorHandler()->handleViewHelperError($error); } }
$componentRenderer = $container->get(static::class); $componentRenderer->setComponentNamespace($componentNamespace); return $renderingContext->getViewHelperInvoker()->invoke( $componentRenderer, $arguments, $renderingContext, $renderChildrenClosure );
'type' => TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper::renderStatic($arguments9, static fn() => '', $renderingContext) , ]; $output0 .= SMS\FluidComponents\Fluid\ViewHelper\ComponentRenderer::renderComponent($arguments7, $renderChildrenClosure8, $renderingContext, 'Zeroseven\\SwuStyleguide\\Components\\Atoms\\Container'); $output0 .= ' ';
new InvalidSectionException('Section "' . $sectionName . '" does not exist.') ); } $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext); $output = $parsedTemplate->$methodNameOfSection($renderingContext); $this->stopRendering(); } else { $sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections'); if (!isset($sections[$sectionName])) {
$content = (new $delegate())->render($renderingContext); } elseif ($partial !== null) { $content = $view->renderPartial($partial, $section, $variables, $optional); } elseif ($section !== null) { $content = $view->renderSection($section, $variables, $optional); } elseif (!$optional) { throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial or delegate and optional flag is false'); } // Replace empty content with default value. If default is
'contentAs' => NULL, 'debug' => true, ]; $output3 .= TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments4, $renderChildrenClosure5, $renderingContext); $output3 .= ' </div> ';
* @return string */ public static function renderStatic(array $arguments, \Closure $childClosure, RenderingContextInterface $renderingContext) { return trim(preg_replace('/\\>\\s+\\</', '><', (string)$childClosure())); } }
$arguments1 = [ ]; $output0 .= TYPO3Fluid\Fluid\ViewHelpers\SpacelessViewHelper::renderStatic($arguments1, $renderChildrenClosure2, $renderingContext); $output0 .= ' ';
} catch (PassthroughSourceException $error) { return $error->getSource(); } $this->startRendering(self::RENDERING_LAYOUT, $parsedTemplate, $this->baseRenderingContext); $output = $parsedLayout->render($this->baseRenderingContext); $this->stopRendering(); } return $output;
protected function htmlResponse(string $html = null): ResponseInterface { return $this->responseFactory->createResponse() ->withHeader('Content-Type', 'text/html; charset=utf-8') ->withBody($this->streamFactory->createStream((string)($html ?? $this->view->render()))); } /** * Returns a response object with either the given json string or the current rendered
'action' => ($this->settings['main']['confirmation'] ? 'confirmation' : 'create'), ] ); return $this->htmlResponse(); } /** * Rewrite Arguments to receive a clean mail object in confirmationAction
} $validationResult = $this->arguments->validate(); if (!$validationResult->hasErrors()) { $this->eventDispatcher->dispatch(new BeforeActionCallEvent(static::class, $this->actionMethodName, $preparedArguments)); $actionResult = $this->{$this->actionMethodName}(...$preparedArguments); } else { $actionResult = $this->{$this->errorMethodName}(); }
$this->view = $this->resolveView(); if ($this->view !== null && method_exists($this, 'initializeView')) { $this->initializeView($this->view); } $response = $this->callActionMethod($request); $this->renderAssetsForRequest($request); return $response; }
throw new InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @' . IgnoreValidation::class . ' annotation is missing on re-displaying a form with validation errors.', 1217839467); } $controller = $this->resolveController($request); try { $response = $controller->processRequest($request); if ($response instanceof ForwardResponse) { // The controller action returned an extbase internal Forward response: // Another action should be dispatched. $request = static::buildRequestFromCurrentRequestAndForwardResponse($request, $response);
* @throws InfiniteLoopException */ public function handleRequest(RequestInterface $request) { return $this->dispatcher->dispatch($request); } /** * This request handler can handle any web request.
} // Dispatch the extbase request $requestHandler = $this->requestHandlerResolver->resolveRequestHandler($extbaseRequest); $response = $requestHandler->handleRequest($extbaseRequest); if ($response->getStatusCode() >= 300) { // Avoid caching the plugin when we issue a redirect or error response // This means that even when an action is configured as cachable // we avoid the plugin to be cached, but keep the page cache untouched
public function run(string $content, array $configuration, ?ServerRequestInterface $request = null): string { $request = $request ?? $GLOBALS['TYPO3_REQUEST']; $this->initialize($configuration); return $this->handleFrontendRequest($request); } protected function handleFrontendRequest(ServerRequestInterface $request): string {
// Extensions should either drop the property altogether if they don't need current instance // of ContentObjectRenderer, or set the property to protected and use the setter above. $classObj->cObj = $this; } $content = $callable($content, $conf, $this->getRequest()); } else { $this->getTimeTracker()->setTSlogMessage('Method "' . $parts[1] . '" did not exist in class "' . $parts[0] . '"', LogLevel::ERROR); } } else {
if ($this->cObj->getUserObjectType() === false) { // Come here only if we are not called from $TSFE->processNonCacheableContentPartsAndSubstituteContentMarkers()! $this->cObj->setUserObjectType(ContentObjectRenderer::OBJECTTYPE_USER); } $tempContent = $this->cObj->callUserFunction($conf['userFunc'], $conf, ''); if ($this->cObj->doConvertToUserIntObject) { $this->cObj->doConvertToUserIntObject = false; $content = $this->cObj->cObjGetSingle('USER_INT', $conf); } else {
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
$timeTracker->decStackPointer(); } else { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } } if ($timeTracker->LR) { $timeTracker->pull($content);
case 'COA': $nonCacheableContent = $contentObjectRendererForNonCacheable->cObjGetSingle('COA', $nonCacheableData[$nonCacheableKey]['conf']); break; case 'FUNC': $nonCacheableContent = $contentObjectRendererForNonCacheable->cObjGetSingle('USER', $nonCacheableData[$nonCacheableKey]['conf']); break; case 'POSTUSERFUNC': $nonCacheableContent = $contentObjectRendererForNonCacheable->callUserFunction($nonCacheableData[$nonCacheableKey]['postUserFunc'], $nonCacheableData[$nonCacheableKey]['conf'], $nonCacheableData[$nonCacheableKey]['content']); break;
protected function recursivelyReplaceIntPlaceholdersInContent(ServerRequestInterface $request) { do { $nonCacheableData = $this->config['INTincScript']; $this->processNonCacheableContentPartsAndSubstituteContentMarkers($nonCacheableData, $request); // Check if there were new items added to INTincScript during the previous execution: // array_diff_assoc throws notices if values are arrays but not strings. We suppress this here. $nonCacheableData = @array_diff_assoc($this->config['INTincScript'], $nonCacheableData); $reprocess = count($nonCacheableData) > 0;
$assetCollector = unserialize($this->config['INTincScript_ext']['assetCollector'], ['allowed_classes' => [AssetCollector::class]]); GeneralUtility::makeInstance(AssetCollector::class)->updateState($assetCollector->getState()); } $this->recursivelyReplaceIntPlaceholdersInContent($request); $this->getTimeTracker()->push('Substitute header section'); $this->INTincScript_loadJSCode(); $this->generatePageTitle();
'prefixWithAbsRefPrefix' ); } $this->timeTracker->push('Non-cached objects'); $controller->INTincScript($request); $this->timeTracker->pull(); } // Create a default Response object and add headers and body to it
&& $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->set_no_cache(sprintf('Semantilizer frontend request (%s, line %d)', self::class, __LINE__)); // Go your way … 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); } }; } }
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); } }; } }
{ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { try { $response = $handler->handle($request); } catch (PropagateResponseException $e) { $response = $e->getResponse(); }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// 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); } }; } }
* @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ($request->hasHeader(PageIndexerRequest::SOLR_INDEX_HEADER)) { /* @var PageIndexerRequestHandler $pageIndexerRequestHandler */ $pageIndexerRequestHandler = GeneralUtility::makeInstance(PageIndexerRequestHandler::class); $pageIndexerRequestHandler->shutdown();
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 ($GLOBALS['TSFE'] instanceof TypoScriptFrontendController) { if ( (!isset($GLOBALS['TSFE']->config['config']['enableContentLengthHeader']) || $GLOBALS['TSFE']->config['config']['enableContentLengthHeader']) && !$GLOBALS['TSFE']->isBackendUserLoggedIn() && !($GLOBALS['TYPO3_CONF_VARS']['FE']['debug'] ?? false)
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->addNecessaryHTML(); $this->addJavaScript(); } 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); } }; } }
} public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); $applicationContext = GeneralUtility::makeInstance(ApplicationContext::class); if ( !$applicationContext->isDevelopment()
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
); } } 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->apiHandler->handle($request); } catch (ResourceNotFoundException | NoConfigurationException $e) { // Usually thrown when requested api slug is not registered. // Like `/api/bla` return $handler->handle($request); } catch (PropagateResponseException $e) { // Might be thrown from custom user middlewares for redirects return $e->getResponse(); } catch (Exception $e) {
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, $controller->metaCharset); $request = $request->withParsedBody($parsedBody); } } $response = $handler->handle($request); /** * Release TSFE locks. They have been acquired in the above call to controller->getFromCache(). * TSFE locks are usually released by the RequestHandler 'final' middleware.
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 // @todo deprecate $GLOBALS['TSFE'] once TSFE is retrieved from the // PSR-7 request attribute frontend.controller throughout TYPO3 core $GLOBALS['TSFE'] = $controller; 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); } }; } }
} $pageIndexerRequestHandler->run(); } 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); } }; } }
$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); } }; } }
$pageArguments = $request->getAttribute('routing', null); if ($pageArguments instanceof PageArguments && $GLOBALS['BE_USER'] instanceof PreviewUserAuthentication) { $GLOBALS['BE_USER']->setWebmounts([$pageArguments->getPageId()]); } 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('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); } }; } }
// 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); } }; } }
$addInformationAboutDisabledCache = true; $setCookieOnCurrentRequest = false; } $response = $handler->handle($request); $tsfe = $this->getTypoScriptFrontendController(); if ($tsfe instanceof TypoScriptFrontendController && $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); } }; } }
$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 $this->createStautsResponse(false); } 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); } }; } }
'X-Render' => (new ReflectionClass($this))->getShortName() ]); } 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 $response; } } return $handler->handle($request); } protected function buildRedirectResponse(UriInterface $uri, array $redirectRecord): ResponseInterface {
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); } }; } }
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); } }; } }
$prefix = $prefixWithoutSlash . '/'; // Check if fluid styleguide should be rendered if (strpos($request->getUri()->getPath(), $prefixWithoutSlash) !== 0) { return $handler->handle($request); } // Correct calls without trailing slash in request url if (strpos($request->getUri()->getPath(), $prefix) !== 0) {
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); } }; } }
$this->language->getLanguageId() === 0 ? (int)$page['uid'] : (int)$page['l10n_parent'] ); if ($enhancerConfiguration === null) { return $handler->handle($request); } $this->configure($enhancerConfiguration);
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); } }; } }
if (strpos($requestedUri->getPath(), '/zabbixclient/') === 0) { return $this->processRequest($request); } return $handler->handle($request); } private function processRequest(ServerRequestInterface $request) {
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); } }; } }
* @return ResponseInterface */ 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
* @param callable $execute Deprecated, will be removed in TYPO3 v12.0 */ final public function run(callable $execute = null) { $response = $this->handle(ServerRequestFactory::fromGlobals()); if ($execute !== null) { trigger_error('Custom execution of Application code will be removed in TYPO3 v12.0, use PSR-15 Middlewares instead.', E_USER_DEPRECATED); $execute(); }
// 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(); });