Bug #86331
closedMountpoints not working with new site configurations
Added by Alexander Grein about 6 years ago. Updated over 4 years ago.
100%
Description
To reproduce:
Add two root pages with a site configuration for each.
Add a standard page with the name "page1" to site a.
Add a mountpoint page with the same name to site b.
Try to open page1 of site b in a browser: e.g. www.site-b.com/page1
Expected:
A page containing the same content as www.site-a.com/page1
Result:
A automatic redirect to a page with a url like www.site-*a*.com/page1?MP=3-20 showing an error:
PageNotFoundException: ID was outside the domain
The menu provider also generates wrong links to the site a with additional MP parameter.
Updated by Alexander Grein about 6 years ago
I forgot to mention:
Put the mountpoint of "page1" of site b to "page1" of site a
Updated by Georg Ringer about 6 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Sascha Wilking about 6 years ago
I can reproduce it. It doesn't matter what the page's name is. In my scenario i have the entry domain2.local/test1, where page "test1" is a mount point to another root (domain1.local) with page "test2". The menu link on domain2.local is also wrong and points to domain1.local/test2.
Updated by Alexander Grein about 6 years ago
It looks like, that the whole MP handling is a known open point in typo3/sysext/core/Classes/Routing/PageUriBuilder.php (line 36):
- @todo: check handling of MP parameter.
Updated by Josef Glatz about 6 years ago
- Priority changed from Should have to Must have
Updated by Susanne Moog about 6 years ago
- Sprint Focus set to On Location Sprint
Updated by Nicolai Schirawski about 6 years ago
I will have a look onto the problem in typo3 sprint berlin
Updated by Nicolai Schirawski about 6 years ago
Hier eine Dokumentation über das Verhalten der Mountpoints in TYPO3 9.5.1-dev: Verhalten innerhalb einer Domain: slug laut BE Link auf diese Seite angezeigter Inhalt ----------------------------------------------------------------------------------------------------------------- Rootseite pid 1 slug: / link: domain1/ |__unter1 pid 2 slug: /unter1 link: domain1/unter1 |__u11 pid 3 slug: /unter1/u11 link: domain1/unter1/u11 Inhalt: "u11" |__u111 pid 4 slug: /unter1/u11/u111 link: domain1/unter1/u11/u111 Inhalt: "u111" ----- Alternative1 :mount 1 mounted auf pid3; "show mounted page" |__mount1 pid 5 slug: /mount1 link: domain1/unter1/u11?MP=3-5 Inhalt: "u11" link: domain1/unter1/u11/u111?MP=3-5 Inhalt: "u111" ----- Alternative2 :mount 1 mounted auf pid3; "show this page" |__mount1 pid 5 slug: /mount1 link: domain1/mount1 Inhalt: "mount1" link: domain1/unter1/u11/u111?MP=3-5 Inhalt: "u111" Verhalten Domain-übergreifend: slug laut BE Link auf diese Seite angezeigter Inhalt ----------------------------------------------------------------------------------------------------------------- Rootseite2 pid 6 slug: / link: domain2/ |__unter2 pid 7 slug: /unter2 link: domain2/unter2 |__u21 pid 8 slug: /unter2/u21 link: domain2/unter2/u21 Inhalt: "u21" |__u211 pid 9 slug: /unter2/u21/u211 link: domain2/unter2/u21/u211 Inhalt: "u211" ----- Alternative1 :mount 2 mounted auf pid3; "show mounted page" |__mount2 pid 10 slug: /mount2 link: domain1/unter1/u11?MP=3-10 Inhalt: => Exception!!! Soll: link: domain2/unter1/u11?MP=3-10 Inhalt: "u11" link: domain1/unter1/u11/u111?MP=3-10 Inhalt: => Exception!!! Soll: link: domain2/unter1/u11/u111?MP=3-10 Inhalt: "u111" ----- Alternative2 :mount 2 mounted auf pid3; "show this page" |__mount2 pid 10 slug: /mount2 link: domain2/mount2 Inhalt: "mount2" link: domain1/unter1/u11/u111?MP=3-10 Inhalt: => Exception!!! Soll: link: domain2/unter1/u11/u111?MP=3-10 Inhalt: "u111"
Updated by Nicolai Schirawski about 6 years ago
I see major conceptional difficulties here. The question is: how do we want to deal with cross-domain-mounts?
The basic use case could be something like this: domain1 has a subtree, e.g. a blog, that should be shown on another page (domain2), too. On domain2 all mounted pages should have urls starting with "domain2".
By allowing that, we run into difficulties: we have to deal with internal links pointing out of the subtree onto other pages of domain1. The edge-case would be a sitemap being part of the subtree. Than the complete site domain1 would be visible under "domain2" as well.
This seems to be unwanted behaviour.
Possible solutions:
- we create a new page-property "allow shared" that allows a page and all of its subpages to be mounted on other domains as well. Internal links out of the shared pages must than either stay on the original domain or be disabled. Implementing that looks like a huge task.
- we just disallow cross-domain-mounts. The use-case "blog-subtree" could than be realised by creating a new subtree in domain2 and mapping all pages using "show content from page"
For the time beeing, I would suggest the second solution.
Updated by Gerrit Code Review over 5 years 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/+/59915
Updated by Gerrit Code Review over 5 years 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/+/59915
Updated by Gerrit Code Review over 5 years 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/+/59915
Updated by Gerrit Code Review over 5 years 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
Updated by Benni Mack over 5 years ago
- Target version changed from next-patchlevel to Candidate for patchlevel
Updated by Christoph Kratz over 5 years ago
$queryParameters['MP'] can have multiple comma-separated parameters, resulting in an endless redirect. The following exam works for me and fixes the problem.
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php:188
if (!is_null($queryParameters['MP'])) {
$mp = explode(",", $queryParameters['MP']);
if (count($mp) > 1) {
$queryParameters['MP'] = $mp[0];
}
}
$siteOfTargetPage = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId((int)$page['uid'], null, $queryParameters['MP'] ?? '');
Updated by Tizian Schmidlin about 5 years ago
We ran into this issue lately too.
We will provide feedback on the current state of the patch asap.
Updated by Stephan Boiting almost 5 years ago
What is the status of the problem? We need the mountpointtrees in a multi-domain-channel asap for typo3 update
Updated by Heiko Karner almost 5 years ago
Is there anything new on this? Looks like it was set to "abandoned"... When will it be taken care of again? We need this for a current project so any Updates on this would be appreciated.
Updated by Claus Fassing almost 5 years ago
We had to cancel a current upgrade project cause of this and need a fix too
Updated by Anonymous almost 5 years ago
I really appreciate any work targeting PHP standards and replacing self-baked solutions with known and approved packages from e.g. symfony.
But mountpoints are there since TYPO3 v3 or even longer - at least they are there ever since I can remember using TYPO3.
v9 will be in security-only-mode within 4 months and it does not look like this issue will be fixed until then.
So this basically means, there is going to be a major TYPO3 LTS version with broken mountpoint-functionality.
And still uncertain if this will ever be fixed in v10 either.
just my 2c.
Updated by Ralf Schlömer almost 5 years ago
Will there still be a working solution in TYPO3 9 LTS for the problems arising from the use of "mountpoints"?
Is there a tutorial somewhere for using mountpoints in TYPO3 9 LTS?
Updated by Christoph Runkel almost 5 years ago
We also have a 40 Domain installation online with 84 Mountpoints incl. subpages.
So this is top urgent for us too.
I would also sponsor a short-term patch for that MP problem. Message me.
Christoph
Updated by Susanne Moog almost 5 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Susanne Moog almost 5 years ago
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review almost 5 years ago
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
Updated by Benni Mack almost 5 years ago
- Related to Bug #89039: MointPoints result in 404 if mounted page is outside the Site added
Updated by Gerrit Code Review almost 5 years 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
Updated by Stephan Boiting almost 5 years ago
Hi, is this patch really for TYPO3 Version 9?
Error: Class 'TYPO3\CMS\Core\Domain\Repository\PageRepository' not found
Updated by Gerrit Code Review almost 5 years 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
Updated by Benni Mack almost 5 years ago
- Related to Bug #82521: Links to a mounted page in a page tree with a different domain are not prepended with the domain added
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Benni Mack almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6170b24fb20bd191b11c8a1db1159e93a0b5bdbd.
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Benni Mack almost 5 years ago
Please see the 9.5 backport https://review.typo3.org/c/Packages/TYPO3.CMS/+/62933
In v10 it's included finally!
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Gerrit Code Review almost 5 years 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
Updated by Benni Mack almost 5 years ago
- Status changed from Under Review to Resolved
Applied in changeset 9fca335b329000f3598eba30cea7483d4fe43b38.
Updated by Oliver Hader almost 5 years ago
- Related to Bug #90156: Avoid removing empty prefixes in mount-point handling added
Updated by Benni Mack almost 5 years ago
- Related to Bug #90166: MountPoints with Site Handling crash if two sites have a page with the same slug added
Updated by Michal Cygankiewicz almost 5 years ago
We have similar issue in our TYPO3 9 installation - and actually your last fixes does not solve our problem.
We have two different websites (separate roots) in our TYPO3 installation.
Installation 1 (pid = 0)
Installation 2 (pid = 0)
and one page which is not actual website but just 'container' which is shared across those two websites. Some of pages from shared folder are linked in Installation 1, other in Installaion 2 and some of them are used by both installations.
Shared (pid=0, uid=110)
- some page (pid = 110, uid=88)
Installation 1 and Installation 2 have it's site configuration defined.
If 'Shared' does not have site configuration defined (should it have one? since it is not real website) - then links are generated like:
domainname.com/index.php?id=88&MP=7-115
and functionality works fine - page could be opened when linked in frontend.
However if I define site configuration for 'Shared' then links in frontend are rendered with routing (example: domainname.com/some-page) but when opening a page - error is displayed
"(1/1) #1518472189 TYPO3\CMS\Core\Error\Http\PageNotFoundException
The requested page does not exist".
Updated by RVVN no-lastname-given almost 5 years ago
Gerrit Code Review wrote:
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
Hello, as we need to upgrade (fast) our 150 TYPO3 websites using mount points, we installed the latest patch.
After somes tests, we found an issue on some pages becoming 404.
Steps to reproduce the issue :
- switch a page from "standard" to "mount point"
- set "mount_pid_ol" to 1
- switch back to standard
The page is now 404.
Updated by Benni Mack almost 5 years ago
RVVN no-lastname-given wrote:
Gerrit Code Review wrote:
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/+/62933Hello, as we need to upgrade (fast) our 150 TYPO3 websites using mount points, we installed the latest patch.
After somes tests, we found an issue on some pages becoming 404.Steps to reproduce the issue :
- switch a page from "standard" to "mount point"
- set "mount_pid_ol" to 1
- switch back to standardThe page is now 404.
Thanks for the info. we've added a followup to latest 9.5 which got merged today, this issue should now be resolved as well!
Updated by Stephan Boiting almost 5 years ago
Hi, we have sites with hundreds of subpages under a mountpoint. In the frontend we have now following error:
Doctrine\DBAL\Exception\DriverException
_An exception occurred while executing 'SELECT `uid`, `l10n_parent`, `pid`, `slug`, `mount_pid`, `mount_pid_ol`, `t3ver_state`, `doktype` FROM `pages` WHERE (`sys_language_uid` = ?) AND (`slug` IN (?, ?, ?, ?, ?, ?)) AND ((`pages`.`deleted` = 0) AND ((`pages`.`t3ver_state` <= 0) AND (`pages`.`pid` <> -1))) ORDER BY `slug` desc' with params [0, "\/", "\/", "\/blahblah", "\/blahblah\/", "\/blahblah", "\/blahblah\/"]: Can't create more than max_prepared_stmt_count statements (current value: 16382)
Sorry, but we also need a quick solution to the problem, because the customer has been waiting for an update for months.
Thx for your good job.
Updated by Benni Mack almost 5 years ago
Hey Stephan,
Stephan Boiting wrote:
Hi, we have sites with hundreds of subpages under a mountpoint. In the frontend we have now following error:
Doctrine\DBAL\Exception\DriverException
_An exception occurred while executing 'SELECT `uid`, `l10n_parent`, `pid`, `slug`, `mount_pid`, `mount_pid_ol`, `t3ver_state`, `doktype` FROM `pages` WHERE (`sys_language_uid` = ?) AND (`slug` IN (?, ?, ?, ?, ?, ?)) AND ((`pages`.`deleted` = 0) AND ((`pages`.`t3ver_state` <= 0) AND (`pages`.`pid` <> -1))) ORDER BY `slug` desc' with params [0, "\/", "\/", "\/blahblah", "\/blahblah\/", "\/blahblah", "\/blahblah\/"]: Can't create more than max_prepared_stmt_count statements (current value: 16382)
Sorry, but we also need a quick solution to the problem, because the customer has been waiting for an update for months.
Thx for your good job.
What version are you running on? We now have mountpoints working across sites in TYPO3 v9.14-dev (latest 9.x-dev-branch as of today). Hope that helps.
In general MountPoint setups are hard to understand, if you don't know the scenarios, so just by taking your example, it seems like you run 9-x-dev from last week. We've fixed some other things today and yesterday in that area.
All the best,
Benni.
Updated by Stephan Boiting almost 5 years ago
Currently we have version 9.5.13.
We have one main domain with many pages, subpages (four level deep) and several domains that mount the main trees with entry points.
In version 7 it works very well.
I will test it with the v9.14-dev version and hope.
Updated by Michal Cygankiewicz almost 5 years ago
Hi Benni,
did you have a chance to read my problem that I described 27.01? Do you think it can be considered as a TYPO3 bug?
As I wrote - without routing configured (parameter urls) it works fine. But when routing is configured then url leeds to "The requested page does not exist". Let me know if you need any more informations regarding that.
Updated by Stephan Boiting almost 5 years ago
Benni Mack wrote:
Hey Stephan,
Stephan Boiting wrote:
Hi, we have sites with hundreds of subpages under a mountpoint. In the frontend we have now following error:
Doctrine\DBAL\Exception\DriverException
_An exception occurred while executing 'SELECT `uid`, `l10n_parent`, `pid`, `slug`, `mount_pid`, `mount_pid_ol`, `t3ver_state`, `doktype` FROM `pages` WHERE (`sys_language_uid` = ?) AND (`slug` IN (?, ?, ?, ?, ?, ?)) AND ((`pages`.`deleted` = 0) AND ((`pages`.`t3ver_state` <= 0) AND (`pages`.`pid` <> -1))) ORDER BY `slug` desc' with params [0, "\/", "\/", "\/blahblah", "\/blahblah\/", "\/blahblah", "\/blahblah\/"]: Can't create more than max_prepared_stmt_count statements (current value: 16382)
Sorry, but we also need a quick solution to the problem, because the customer has been waiting for an update for months.
Thx for your good job.
What version are you running on? We now have mountpoints working across sites in TYPO3 v9.14-dev (latest 9.x-dev-branch as of today). Hope that helps.
In general MountPoint setups are hard to understand, if you don't know the scenarios, so just by taking your example, it seems like you run 9-x-dev from last week. We've fixed some other things today and yesterday in that area.
All the best,
Benni.
Ok, problem solved.
It is necessary that all domains with mountpoints, also deactive channels, in the site configuration are completely configured, with languages etc.
Otherwise you will have problems above.
But there is a next problem: 404 error if slug name more than two times in multichannel domains (with patch https://forge.typo3.org/issues/90166)
Main Domain
- Mainpage 1
-- Subpage 1
-- Subpage 2
...
Second Domain
- Mainpage 1 (Mountpoint with mount_pid_ol from "Main Domain->Mainpage 1") ------- Status: OK (Same slug as "Main Domain->Mainpage 1")
Third Domain
- Mainpage 1 (Mountpoint with mount_pid_ol from "Main Domain->Mainpage 1") ------- Status: 404 ERROR (Same slug as "Main Domain->Mainpage 1")
...
If "Second Domain->Mainpage 1" has another slug name as "Main Domain->Mainpage 1" "Third Domain->Mainpage 1" is also Status: OK
Updated by Michal Cygankiewicz almost 5 years ago
Further information from my side - I am able to reproduce my problem on clean TYPO3 installation with introduction package installed. Related typoscript configuration that is used is:
config {
MP_mapRootPoints = root
MP_disableTypolinkClosestMPvalue = 0
content_from_pid_allowOutsideDomain = 1
typolinkEnableLinksAcrossDomains = 1
typolinkCheckRootline = 1
}
Updated by RVVN no-lastname-given almost 5 years ago
Stephan Boiting wrote:
But there is a next problem: 404 error if slug name more than two times in multichannel domains (with patch https://forge.typo3.org/issues/90166)
Main Domain
- Mainpage 1
-- Subpage 1
-- Subpage 2
...Second Domain
- Mainpage 1 (Mountpoint with mount_pid_ol from "Main Domain->Mainpage 1") ------- Status: OK (Same slug as "Main Domain->Mainpage 1")Third Domain
- Mainpage 1 (Mountpoint with mount_pid_ol from "Main Domain->Mainpage 1") ------- Status: 404 ERROR (Same slug as "Main Domain->Mainpage 1")...
If "Second Domain->Mainpage 1" has another slug name as "Main Domain->Mainpage 1" "Third Domain->Mainpage 1" is also Status: OK
We also confirm the issue when testing on our sites (with patch https://forge.typo3.org/issues/90166).
The fact is that on some multi-sites instances, we have 30-40 sites referring same pages of the "Main" domain.
We also confirm that if you change the slug on each mounting point, the status is then OK.
We need a fix please please ;)
Updated by Christian Eßl over 4 years ago
- Related to Bug #90648: Infinite recursion with new mount point support in sites with multiple websites with same slug name for mount points added
Updated by Benni Mack over 4 years ago
- Related to Bug #90469: Mountpoint information fetched for slug outside of site root added
Updated by Benni Mack over 4 years ago
- Status changed from Closed to Resolved
Thanks for all of your feedback regarding the leftover issues.
Can you please check against the related issues and if your case does not match, open a new ticket with reference to this one? Because then I can create new patches.
Thanks a lot again! I'm committed to making all of these pains go away.