#91285PageRouter takes always first possible MPvar
Description
If a multi-domain installation has the same page mounted to different domains, only one page will be able to display the mounted page tree.
I have the following setup (Page UID – type – slug):
Root
[11] - Domain.at - "/"
[12] - MP - "/glass"
[31] - Domain.hr - "/"
[32] - MP - "/glass"
[16] - Domain.cz - "/"
[17] - MP - "/glass"
[36] - Domain.it - "/"
[37] - MP - "/glass"
[21] - Domain.sk - "/"
[22] - MP - "/glass"
[6] - Domain.ch - "/"
[7] - Page - "/glass"
[814] - MP - "/glass/properties"
[26] - Domain.ua - "/"
[27] - MP - "/glass"
[1] - Domain.ch - "/"
[2] - Page - "/glass"
[242] - Page - "/glass/properties"
- Domain.com has the page tree without MountPoints
- Domain.ch has the page mounted with “show page of mounted page”
- The rest of the domains has the Mount Point one level up and mounts the whole page tree under “glass”
I always call the same URL. on each Domain “/en/glass/properties”
https://www.domain.at/en/glass/properties – OK
https://www.domain.hr/en/glass/properties – “ID was outside the domain”
https://www.domain.cz/en/glass/properties – “ID was outside the domain”
https://www.domain.it/en/glass/properties – “ID was outside the domain”
https://www.domain.sk/en/glass/properties – “ID was outside the domain”
https://www.domain.ch/en/glass/properties – “ID was outside the domain”
https://www.domain.ua/en/glass/properties – “ID was outside the domain”
https://www.domain.com/en/glass/properties – OK
The result of getPagesFromDatabaseForCandidates looks always the but with the correct root page UID.
Result for AT:
[0] => Array
(
[uid] => 2
[pid] => 1
...
[doktype] => 1
...
[mount_pid] => 0
[mount_pid_ol] => 0
...
[slug] => /glass
...
[MPvar] => 2-12
)
[1] => Array
(
[uid] => 242
[l10n_parent] => 0
[pid] => 2
[slug] => /glass/properties
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
[MPvar] => 2-12
)
[2] => Array
(
[uid] => 11
[l10n_parent] => 0
[pid] => 0
[slug] => /
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
)
Exact same result for HR, CZ, IT, SK. Only the UID of the root page is different:
[0] => Array
(
[uid] => 2
[pid] => 1
...
[doktype] => 1
...
[mount_pid] => 0
[mount_pid_ol] => 0
...
[slug] => /glass
...
[MPvar] => 2-12
)
[1] => Array
(
[uid] => 242
[l10n_parent] => 0
[pid] => 2
[slug] => /glass/properties
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
[MPvar] => 2-12
)
[2] => Array
(
[uid] => 31
[l10n_parent] => 0
[pid] => 0
[slug] => /
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
)
Since the first mount point fills up the MPvar and the MountPage record in the array during the first run, all the other pages are skipped in line 441++
if ($mountedPage && PageRepository::DOKTYPE_MOUNTPOINT === (int)$row['doktype'] && $row['mount_pid_ol']) {
// If the mounted page was already added from above, this should not be added again (to include
// the mount point parameter).
if (in_array((int)$mountedPage['uid'], $excludeUids, true)) {
continue;
}
And I think this is causing the “ID was outside the domain” error.
As addition the result of the Domain.com main page:
[0] => Array
(
[uid] => 242
[l10n_parent] => 0
[pid] => 2
[slug] => /glass/properties
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
)
[1] => Array
(
[uid] => 2
[l10n_parent] => 0
[pid] => 1
[slug] => /glass
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
)
[2] => Array
(
[uid] => 1
[l10n_parent] => 0
[pid] => 0
[slug] => /
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
)
And the result of the site with the mounted page:
[0] => Array
(
[uid] => 7
[l10n_parent] => 0
[pid] => 6
[slug] => /glass
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
)
[1] => Array
(
[uid] => 2
[pid] => 1
...
[title] => Glass
[doktype] => 1
...
[mount_pid] => 0
[mount_pid_ol] => 0
...
[slug] => /glass
...
[MPvar] => 2-12
)
[2] => Array
(
[uid] => 242
[l10n_parent] => 0
[pid] => 2
[slug] => /glass/properties
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
[MPvar] => 2-12
)
[3] => Array
(
[uid] => 6
[l10n_parent] => 0
[pid] => 42
[slug] => /
[mount_pid] => 0
[mount_pid_ol] => 0
[t3ver_state] => 0
[doktype] => 1
)Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 14
-
Steffen Hastädt changed description <span data-processor="relativetime" data-value="2020-05-03T22:02:48+00:00" > 05/03/20, 22:02 </span>
-
Steffen Hastädt changed
Screenshot2020-05-03-21.17.12.png<span data-processor="relativetime" data-value="2020-05-03T22:03:41+00:00" > 05/03/20, 22:03 </span> -
Steffen Hastädt changed description <span data-processor="relativetime" data-value="2020-05-03T22:08:46+00:00" > 05/03/20, 22:08 </span>
-
Steffen Hastädt changed description <span data-processor="relativetime" data-value="2020-05-03T22:14:27+00:00" > 05/03/20, 22:14 </span>
-
Steffen Hastädt changed description <span data-processor="relativetime" data-value="2020-05-03T22:16:48+00:00" > 05/03/20, 22:16 </span>
-
Steffen Hastädt changed description <span data-processor="relativetime" data-value="2020-05-03T22:27:29+00:00" > 05/03/20, 22:27 </span>
-
Steffen Hastädt changed subject
routeEnhancers takes always first possible MPvarPageRouter takes always first possible MPvar <span data-processor="relativetime" data-value="2020-05-03T22:41:16+00:00" > 05/03/20, 22:41 </span> -
Steffen Hastädt changed description <span data-processor="relativetime" data-value="2020-05-03T22:48:55+00:00" > 05/03/20, 22:48 </span>
-
Steffen Hastädt commented <span data-processor="relativetime" data-value="2020-05-03T22:51:18+00:00" > 05/03/20, 22:51 </span>
-
Benni Mack changed Is Regression 1 <span data-processor="relativetime" data-value="2020-05-04T08:31:13+00:00" > 05/04/20, 08:31 </span>
-
Steffen Hastädt changed description <span data-processor="relativetime" data-value="2020-05-04T13:37:42+00:00" > 05/04/20, 13:37 </span>
-
Benni Mack commented <span data-processor="relativetime" data-value="2022-11-11T16:16:05+00:00" > 11/11/22, 16:16 </span>
Yes. I understood your ticket.
The main problem is that when going through all possible pages with the same slug, the Mounted Page is already “used” or “re-used” within the getPagesFromDatabaseForCandidates, however we should distinguish them on a per-site level.
If MPvar within this class needs to be stored on a per-site basis, not on a global basis.
-
Benni Mack changed status
NewAccepted <span data-processor="relativetime" data-value="2022-11-11T16:16:56+00:00" > 11/11/22, 16:16 </span> -
Benni Mack commented and changed status
AcceptedClosed <span data-processor="relativetime" data-value="2026-11-06T10:24:39+00:00" > 11/06/26, 10:24 </span>Cannot reproduce this on current main anymore. The scenario from the description (same page mounted by several sites with identical slugs, with and without “show content of mounted page”, plus a site mounting only the subpage) resolves /en/glass/properties correctly on every site with the site-specific MP parameter. Mount points of other sites with the same slug are skipped since #90469 (Allow multiple mountpoints with the same slug). Closing — please reopen with a reproducible setup if it still occurs on 13.4/14.x.
I think the MPvar and the MountPoint page itself are wrong as the result of this method:
and
[1] => Array ( [uid] => 242 [l10n_parent] => 0 [pid] => 2 [slug] => /glass/properties [mount_pid] => 0 [mount_pid_ol] => 0 [t3ver_state] => 0 [doktype] => 1 [MPvar] => 2-12 )