File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -160,16 +160,16 @@ public function __construct(
160160 public function locationViewAction (Request $ request , ContentView $ view ): ContentView
161161 {
162162 $ location = $ view ->getLocation ();
163- if ($ location === null || $ location -> id === null ) {
164- $ contentId = $ view ->getContent ()->id ?? ' unknown ' ;
163+ if ($ location === null ) {
164+ $ contentId = $ view ->getContent ()->getId () ;
165165 throw new NotFoundException ('Location ' , "content ID {$ contentId }" );
166166 }
167167
168168 // We should not cache ContentView because we use forms with CSRF tokens in template
169169 // JIRA ref: https://issues.ibexa.co/browse/EZP-28190
170170 $ view ->setCacheEnabled (false );
171171
172- if (!$ view ->getContent ()->contentInfo ->isTrashed ()) {
172+ if (!$ view ->getContent ()->getContentInfo () ->isTrashed ()) {
173173 $ this ->supplyPathLocations ($ view );
174174 $ this ->subitemsContentViewParameterSupplier ->supply ($ view );
175175 $ this ->supplyContentActionForms ($ view );
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public function matchItem(ItemInterface $item): ?bool
3737 if ($ contentView instanceof ContentView) {
3838 $ location = $ contentView ->getLocation ();
3939 if ($ location !== null ) {
40- $ path = $ location ->path ?? [ $ location -> id ] ;
40+ $ path = $ location ->getPath () ;
4141
4242 if (in_array ($ locationId , $ path , true )) {
4343 return true ;
You can’t perform that action at this time.
0 commit comments