Bug #101624
open
PHP Warning: Undefined array key "MPvar" in typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php line 399
Added by Philipp Parzer over 1 year ago.
Updated about 1 month ago.
Description
Error occurs if you have a mount point, which points to a page and this page has a subpage which has a content_from_pid
set
- Home
- A
- aa
- ab (show content from aa)
- B (mount point to A)
if you now call /B/ab you get the error
could be easily solved:
(string)($pageCandidate['MPvar'] ?? $pageCandidate['mount_pid_ol']),
Related issues
1 (1 open — 0 closed)
- Assignee set to Thomas Hohn
- Status changed from New to Under Review
- Subject changed from PHP Warning: Undefined array key "MPvar" in /website/public/typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php line 399 to PHP Warning: Undefined array key "MPvar" in typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php line 399
- Description updated (diff)
Philipp Parzer wrote:
Error occurs if you have a mount point, which points to a page and this page has a subpage which has a content_from_pid
set
[...]
if you now call /B/ab you get the error
could be easily solved:
(string)($pageCandidate['MPvar'] ?? $pageCandidate['mount_pid_ol']),
Philipp Parzer wrote:
Error occurs if you have a mount point, which points to a page and this page has a subpage which has a content_from_pid
set
[...]
if you now call /B/ab you get the error
could be easily solved:
(string)($pageCandidate['MPvar'] ?? $pageCandidate['mount_pid_ol']),
Could you please verify the proposed patch @Philipp Parzer ?
already verified Patchset 3
@Philipp there was a question to reproduce in gerrit.
I can reproduce it by setting at one of the pages (A, ab) in the example above
- Home
- A
- aa
- ab (show content from aa)
- B (mount point to A)
the field mount_pid_ol
to 1. this can be achieved by switching it to type mount point, set the field and set it back to regular page or just use the DB
- Related to Bug #104750: PHP Warning: Trying to access array offset on null in PageSlugCandidateProvider.php when mounted page has been deleted added
Also available in: Atom
PDF