Project

General

Profile

Actions

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 2 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2023-08-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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 open0 closed)

Related to TYPO3 Core - Bug #104750: PHP Warning: Trying to access array offset on null in PageSlugCandidateProvider.php when mounted page has been deletedNew2024-08-27

Actions
Actions #1

Updated by Thomas Hohn over 1 year ago

  • Assignee set to Thomas Hohn
Actions #2

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80512

Actions #3

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80512

Actions #4

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80512

Actions #5

Updated by Simon Schaufelberger about 1 year ago

  • 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)
Actions #6

Updated by Thomas Hohn about 1 year ago

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 ?

Actions #7

Updated by Philipp Parzer about 1 year ago

already verified Patchset 3

Actions #8

Updated by Philipp Parzer 9 months ago

any new updates on this?

Actions #9

Updated by Georg Ringer 6 months ago

@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

Actions #10

Updated by Gerrit Code Review 3 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80512

Actions #11

Updated by Stefan Bürk 3 months ago

  • Related to Bug #104750: PHP Warning: Trying to access array offset on null in PageSlugCandidateProvider.php when mounted page has been deleted added
Actions #12

Updated by Gerrit Code Review about 2 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80512

Actions

Also available in: Atom PDF