@@ -77,7 +77,7 @@ protected function findErrorPage($requestPath, $statusCode)
77
77
})
78
78
// filter invalid dimensions
79
79
->filter (function ($ page ) use ($ dimension ) {
80
- return \in_array ($ dimension , $ page ->getDimensions ()['language ' ]);
80
+ return $ dimension !== null ? \in_array ($ dimension , $ page ->getDimensions ()['language ' ]) : true ;
81
81
})
82
82
// remove pages which are not in the path
83
83
->reject (function ($ page ) use ($ requestPath , $ dimension ) {
@@ -134,15 +134,22 @@ protected function getErrorPages($dimension)
134
134
*/
135
135
protected function getContext ($ dimension )
136
136
{
137
- return $ this -> contextFactory -> create ( [
137
+ $ context = [
138
138
'workspaceName ' => 'live ' ,
139
139
'currentDateTime ' => new \Neos \Flow \Utility \Now (),
140
- 'dimensions ' => [' language ' => [ $ dimension , $ this -> contentDimensionsConfig [ ' defaultPreset ' ]] ],
141
- 'targetDimensions ' => [' language ' => $ dimension ],
140
+ 'dimensions ' => [],
141
+ 'targetDimensions ' => [],
142
142
'invisibleContentShown ' => true ,
143
143
'removedContentShown ' => false ,
144
144
'inaccessibleContentShown ' => false
145
- ]);
145
+ ];
146
+
147
+ if ($ dimension !== null ) {
148
+ $ context ['dimensions ' ]['language ' ] = [$ dimension , $ this ->contentDimensionsConfig ['defaultPreset ' ]];
149
+ $ context ['targetDimensions ' ]['language ' ][] = $ dimension ;
150
+ }
151
+
152
+ return $ this ->contextFactory ->create ($ context );
146
153
}
147
154
/**
148
155
* get the current dimension preset key
0 commit comments