Skip to content

Commit

Permalink
TASK: Followup neos#4880 use fusion view instead of fluid for welcome…
Browse files Browse the repository at this point in the history
… rendering fallback
  • Loading branch information
mhsdesign committed Feb 16, 2024
1 parent 9537cae commit 0c11068
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Neos.Neos/Classes/View/FusionExceptionView.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use Neos\Flow\Mvc\View\AbstractView;
use Neos\Flow\ObjectManagement\ObjectManagerInterface;
use Neos\Flow\Security\Context as SecurityContext;
use Neos\FluidAdaptor\View\StandaloneView;
use Neos\Fusion\Core\FusionGlobals;
use Neos\Fusion\Core\Runtime as FusionRuntime;
use Neos\Fusion\Core\RuntimeFactory;
Expand Down Expand Up @@ -232,10 +231,10 @@ private function renderErrorWelcomeScreen(): string
// in case no neos site being there or no site node we cannot continue with the fusion exception view,
// as we wouldn't know the site and cannot get the site's root.fusion
// instead we render the welcome screen directly
// Todo hack to use fluid. Requires the Welcome.html to be ported to Fusion. PR -> https://github.com/neos/neos-development-collection/pull/4880
$view = StandaloneView::createWithOptions([
'templatePathAndFilename' => 'resource://Neos.Neos/Private/Templates/Error/Welcome.html',
'layoutRootPaths' => ['resource://Neos.Neos/Private/Layouts/']
$view = \Neos\Fusion\View\FusionView::createWithOptions([
'fusionPath' => 'Neos/Fusion/NotFoundExceptions',
'fusionPathPatterns' => ['resource://Neos.Neos/Private/Fusion/Error/Root.fusion'],
'enableContentCache' => false,
]);
$view->assignMultiple($this->variables);
return $view->render();
Expand Down
5 changes: 5 additions & 0 deletions Neos.Neos/Resources/Private/Fusion/Error/Root.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ Neos.Fusion.DatabaseConnectionExceptions = Neos.Neos:Error.View.Welcome {
exception = ${exception}
renderingGroupName = ${renderingOptions.renderingGroup}
}

Neos.Fusion.NotFoundExceptions = Neos.Neos:Error.View.Welcome {
exception = ${exception}
renderingGroupName = ${renderingOptions.renderingGroup}
}

0 comments on commit 0c11068

Please sign in to comment.