70572[BUGFIX] Fix routing with many root pages in same domain
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 2
Review log 2329
Show 24 earlier messages
-
Tomek Woldański uploaded patch set 1 08/13/21, 11:55
-
core-ci voted on patch set 1 V -1 08/13/21, 12:15 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14951
-
Tymoteusz Motylewski rebased onto patch set 2 08/13/21, 16:55
-
core-ci voted on patch set 2 V +1 08/13/21, 17:14 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15002
-
Stefan Busemann commented on patch set 2 08/14/21, 12:09
i am on it -
Stefan Busemann commented on patch set 2 V +1 CR +1 08/14/21, 12:25
works - but it need documentation -
Tymoteusz Motylewski commented on patch set 2 08/18/21, 05:17
please add tests which are red without this patch. -
Tymoteusz Motylewski voted on patch set 2 CR -1 08/18/21, 05:17
-
Tomek Woldański uploaded patch set 3 08/27/21, 15:33
-
core-ci voted on patch set 3 V +1 08/27/21, 15:57 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15738
-
Stefan Busemann commented on patch set 3 V +1 CR +1 09/08/21, 19:36
works as described -
Stefan Bürk commented on patch set 3 CR -1 10/02/21, 12:31
Thanks for the patch and your work. I understand what you want to archieve, but that's not still not conflict free. For example, if there is a site identifier begining with "zzz_", for what ever reason, your solution breakes again. Ex. add this to your unit test: ``` $zzzzSite = new Site('zzz_site', 5, [ 'base' => 'http://9-5.typo3.test';, 'languages' => [ 0 => [ 'title' => 'German', 'languageId' => 0, 'base' => '/es/', 'locale' => 'es_ES-UTF-8' ], ] ]); ``` and for the mock ``` ->willReturn([ 'siteA' => $firstSite, 'siteB' => $secondSite, 'siteC' => $rootSite, 'siteD' => $lastSite, 'zzz_site' => $zzzzSite ]); ``` your test will fail. Maybe we should consider to change the identenfier format for all, so it can be determistic. Instead of ``` site_<site-identifier>(|_<language-id>) ``` or special identifier in your case for '/' path ``` site_zz_<site-identifier>(|_<language-id>) ``` to general identifier format for site/siteLanguage of ``` site_<mb_strlen(path)>_<siteRootPageId>_(|_<language-id>) ``` As far I can see the site identifier has real meaning, but the implemented sort is on the identifier and so the '/' will be sorted as last. First local tests has shown that this could work instead of the proposed patch. -
Stefan Bürk uploaded patch set 4 10/02/21, 12:50
-
core-ci voted on patch set 4 V +1 10/02/21, 13:03 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17486
-
Stefan Bürk commented on patch set 4 10/02/21, 13:04
Reply
Done -
Stefan Bürk voted on patch set 4 V +1 CR +1 10/02/21, 13:04
-
Helmut Hummel commented on patch set 4 CR -1 10/05/21, 00:21
Hm, not sure. This rather is a workaround for a misconfiguration. Let's discuss the conceptual part on Forge first. -
Helmut Hummel commented on patch set 4 CR -2 10/05/21, 00:35
Hm, gave this yet another thought. From what I understand now, why this happens, just changing some identifiers isn't a solution to the problem. I will block this for now, but I'm happy to unblock if I'm mistaken. -
Benni Mack updated the commit message in patch set 5 11/18/21, 10:40
-
core-ci voted on patch set 5 V +1 11/18/21, 11:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19452
-
Benni Mack wrote 11/29/21, 10:16
Change destination moved from master to main -
Benni Mack updated the commit message in patch set 6 11/29/21, 14:02
-
core-ci voted on patch set 6 V +1 11/29/21, 15:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20073
-
Oliver Hader commented on patch set 6 CR -2 04/10/22, 08:22
The current patch changes the processing order by modifying identifiers (based on path/URI length), which still is considered "guess-work". The actual problem is the ambiguity of base paths `/`, `/de`, `/fr` (`/` being part of the other two). The algorithm should be changed to resolve the best (exact) match first. -
Oliver Hader commented on patch set 6 04/10/22, 08:42
SiteMatcher.php:225This line, the sorting, is causing the problem - because it does not consider exact matches. -
Stefan Bürk commented on patch set 6 CR -1 04/10/22, 13:29
SiteMatcher.php:225ReplyHave to disagree here, this sorting is not the issue. This is the first level. In the testcase and documented issue all have the same host, so in the first level there is only one entry. So it is more the "sorting" on the second level (L227) which sorts on the path part itself. But I think this is still not the full solution. In the end, we have kind of ambigous configuration with this use case, and playing around to fix this with just "sorting" across multipl "site configuration" is error prone. And in the end nothing else as this patch original tried to mitigate by adding the "one" at the end. I had now put several hours splitted across multiple weeks into this issue. And eventually multiple solution possibilities, each with "yeah, but in the other case ..." - not fullfilled. I think, the basic Idee behind this patch is still the best way to go - tell the system which has the higher precedence across other things. But there are more things which wents into this, which cannot be done exactly with such an abigous configuration automatically. I think we have to do here multiple things to give users possibilties at hand to make "ambigous" configurations unambigous. For example, if multiple site roots are given with the same base path, each with languages (default languages) with language paths as variant. Which is the "first" default language to redirect to ? We must ensure that we can give users the abillity to create unambigous configurations instead of trying to work around and solve the ambigous and do what users expects in different constellations - which will be a issue without and bottom. I have some ideas to solve this with multiple part solutions - maybe we can have a talk/discussion about this before hand @Oliver Hader? -
Stefan Bürk commented on patch set 6 04/10/22, 20:22
SiteMatcher.php:225ReplyCreated a alternative (POC) which addresses at least the same topic as this patch, but with another approach. https://review.typo3.org/c/Packages/TYPO3.CMS/+/74266 -
Oliver Hader commented on patch set 6 04/11/22, 07:59
SiteMatcher.php:225Reply Unresolved> Have to disagree here, this sorting is not the issue. This is the first level. In the testcase and documented issue all have the same host, so in the first level there is only one entry. Sorry, I was not precise... "these lines, the sortings ..." - all of them. Changing the processing order has to be seen in combination in that partitioning. I guess(!) it might be possible to resolve partitions (and the 3-layer structure), thus reduce complexity and finally tackle the underlying issue of this change. -
Oliver Hader abandoned the change 11/09/22, 09:22