Bug #87473

Type error in PageLinkBuilder.php

Added by Robert von Hackwitz about 1 year ago. Updated 2 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2019-01-18
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Argument 2 passed to TYPO3\CMS\Frontend\Typolink\PageLinkBuilder::populateMountPointMapForPageRecursively() must be of the type integer, string given, called in typo3_src-9.5.3/typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php on line 612
but actually method initializeMountPointMap can pass a string.

Method populateMountPointMapForPageRecursively:

 protected function populateMountPointMapForPageRecursively(array &$mountPointMap, int $id, $MP_array = [], $level = 0)
    {
        if ($id <= 0) {
            return;
        }
        // First level, check id
        if (!$level) {
            // Find mount point if any:
            $mount_info = $this->getTypoScriptFrontendController()->sys_page->getMountPointInfo($id);

Call inside method initializeMountPointMap:
$rootPoints = GeneralUtility::trimExplode(',', strtolower($mapRootPointList), true);
        // Traverse rootpoints
        foreach ($rootPoints as $p) {
            $initMParray = [];
            if ($p === 'root') {
                $rootPage = $this->getTypoScriptFrontendController()->tmpl->rootLine[0];
                $p = $rootPage['uid'];
                if ($p['_MOUNT_OL'] && $p['_MP_PARAM']) {
                    $initMParray[] = $p['_MP_PARAM'];
                }
            }
            $this->populateMountPointMapForPageRecursively($mountPointMap, $p, $initMParray);
        }
        $runtimeCache->set('pageLinkBuilderMountPointMap', $mountPointMap);
        return $mountPointMap;

Associated revisions

Revision 0a323544 (diff)
Added by Benni Mack 12 months ago

[BUGFIX] Fix strict type error in recursive mount point resolving

PageLinkBuilder::populateMountPointMapForPageRecursively() requires
the $id parameter to be an integer, so this is cast properly now.

In addition, one regression is fixed where
"config.MP_mapRootPoints = root" was set, the proper variables
are now used.

Resolves: #87547
Resolves: #87473
Releases: master, 9.5
Change-Id: I899120d301309d768b9e498ad7f4ec96b9618b9d
Reviewed-on: https://review.typo3.org/c/59916
Tested-by: Markus Klein <>
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Reviewed-by: Markus Klein <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Georg Ringer <>

Revision ea7c4b47 (diff)
Added by Benni Mack 12 months ago

[BUGFIX] Fix strict type error in recursive mount point resolving

PageLinkBuilder::populateMountPointMapForPageRecursively() requires
the $id parameter to be an integer, so this is cast properly now.

In addition, one regression is fixed where
"config.MP_mapRootPoints = root" was set, the proper variables
are now used.

Resolves: #87547
Resolves: #87473
Releases: master, 9.5
Change-Id: I899120d301309d768b9e498ad7f4ec96b9618b9d
Reviewed-on: https://review.typo3.org/c/59923
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Benni Mack <>

Revision 6170b24f (diff)
Added by Benni Mack about 1 month ago

[FEATURE] Native MountPoint support for Site Handling

In order to link to mountpoints with Site Handling, the RootlineUtility
needs to receive the MountPoint parameter, to correctly
deal with mountpoint-related subpages.

Mount Points are based on the assumption that the "context" (the original
site environment) is kept. For this to work, the slug of the mount page (doktype=7)
is prefixed to the URL, but the common prefix of the subpages is trimmed
with the value of the mounted page (= pointer record).

The MP parameter is then added to PageArguments within the PageArguments
as "routeArgument" (= safe and clean argument) where TYPO3 is dealing
with this feature again in the same fashion it as before.

Various side-effects when dealing with mount points from other domains
still exist (= different language setup, or non-existing sites).

Feature Set:
  • Multi-language setup (= when language setup is the same) with slugs
  • Recursive mount points
  • No MP parameter available in URLs anymore (at all)
  • Multi-site setup (= when language setup is the same)

If a subpage of a mount page does not inherit the slug of the mounted page,
then the slug of the subpage is added in full afterwards.

Resolves: #86331
Resolves: #87473
Resolves: #89039
Releases: master, 9.5
Change-Id: I58f41eb325a07cc0c4a0dfeab1164eb8c58c7314
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62878
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Tested-by: Daniel Siepmann <>
Tested-by: Benni Mack <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Daniel Goerz <>
Reviewed-by: Benni Mack <>

Revision 9fca335b (diff)
Added by Benni Mack about 1 month ago

[FEATURE] Native MountPoint support for Site Handling

In order to link to mountpoints with Site Handling, the RootlineUtility
needs to receive the MountPoint parameter, to correctly
deal with mountpoint-related subpages.

Mount Points are based on the assumption that the "context" (the original
site environment) is kept. For this to work, the slug of the mount page (doktype=7)
is prefixed to the URL, but the common prefix of the subpages is trimmed
with the value of the mounted page (= pointer record).

The MP parameter is then added to PageArguments within the PageArguments
as "routeArgument" (= safe and clean argument) where TYPO3 is dealing
with this feature again in the same fashion it as before.

Various side-effects when dealing with mount points from other domains
still exist (= different language setup, or non-existing sites).

Feature Set:
  • Multi-language setup (= when language setup is the same) with slugs
  • Recursive mount points
  • No MP parameter available in URLs anymore (at all)
  • Multi-site setup (= when language setup is the same)

If a subpage of a mount page does not inherit the slug of the mounted page,
then the slug of the subpage is added in full afterwards.

Resolves: #86331
Resolves: #87473
Resolves: #89039
Releases: master, 9.5
Change-Id: I58f41eb325a07cc0c4a0dfeab1164eb8c58c7314
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62933
Tested-by: TYPO3com <>
Tested-by: Marco Huber <>
Tested-by: Daniel Siepmann <>
Tested-by: Benni Mack <>
Reviewed-by: Marco Huber <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Robert von Hackwitz about 1 year ago

  • Category set to Frontend

#2 Updated by Robert von Hackwitz about 1 year ago

  • Priority changed from Must have to Should have
  • Target version set to Candidate for patchlevel

#3 Updated by Robert von Hackwitz about 1 year ago

  • Target version changed from Candidate for patchlevel to next-patchlevel

#4 Updated by Gerrit Code Review 12 months ago

  • Status changed from New to Under Review

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

#5 Updated by Gerrit Code Review 12 months ago

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

#6 Updated by Gerrit Code Review 12 months ago

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

#7 Updated by Gerrit Code Review 12 months ago

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

#8 Updated by Gerrit Code Review 12 months ago

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

#9 Updated by Benni Mack 12 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#10 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

#11 Updated by Gerrit Code Review about 2 months ago

  • Status changed from Closed to Under Review

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

#12 Updated by Gerrit Code Review about 2 months ago

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

#13 Updated by Gerrit Code Review about 2 months ago

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

#14 Updated by Gerrit Code Review about 2 months ago

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

#15 Updated by Gerrit Code Review about 2 months ago

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

#16 Updated by Gerrit Code Review about 1 month ago

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

#17 Updated by Gerrit Code Review about 1 month ago

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

#18 Updated by Gerrit Code Review about 1 month ago

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

#19 Updated by Gerrit Code Review about 1 month ago

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

#20 Updated by Benni Mack about 1 month ago

  • Status changed from Under Review to Resolved

#21 Updated by Gerrit Code Review about 1 month ago

  • Status changed from Resolved to Under Review

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

#22 Updated by Gerrit Code Review about 1 month ago

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

#23 Updated by Gerrit Code Review about 1 month ago

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

#24 Updated by Gerrit Code Review about 1 month ago

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

#25 Updated by Gerrit Code Review about 1 month ago

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

#26 Updated by Gerrit Code Review about 1 month ago

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

#27 Updated by Gerrit Code Review about 1 month ago

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

#28 Updated by Benni Mack about 1 month ago

  • Status changed from Under Review to Resolved

#29 Updated by Benni Mack 2 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF