64351[FEATURE] Allow pattern mappers to be unique in Site
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 9
- typo3/sysext/core/Classes/Routing/Aspect/PersistedAliasMapper.php2+5 −2
- typo3/sysext/core/Classes/Routing/Aspect/PersistedPatternMapper.php2+5 −2
- typo3/sysext/core/Configuration/DefaultConfiguration.php2+1 −0
- typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml+3 −0
- typo3/sysext/core/Configuration/FactoryConfiguration.php+1 −0
- typo3/sysext/core/Documentation/Changelog/9.5/Feature-86365-RoutingEnhancersAndAspects.rst1+7 −1
- typo3/sysext/core/Documentation/Changelog/9.5.x/Feature-91235-LimitPersistedAliasMapperAndPersistedPatternMapperAspectsToASpecificSite.rstnew+46 −0
- typo3/sysext/core/Tests/Functional/Routing/Aspect/PersistedAliasMapperTest.php+1 −1
- typo3/sysext/core/Tests/Functional/Routing/Aspect/PersistedPatternMapperTest.php+1 −1
Review log 3339
Show 1114 earlier messages
-
Benni Mack uploaded patch set 1 04/30/20, 09:23
-
TYPO3com voted on patch set 1 V -1 04/30/20, 09:34 Completed build in 11m 22s on Thu, 30 Apr, 09:34 AM Test Summary: 110 of 74147 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3121
-
Thomas Anders commented on patch set 1 V +1 CR +1 04/30/20, 09:41
Fixes our „PageNotFoundExeception“ for all our plugins, with global sysfolders. -
Benni Mack uploaded patch set 2 04/30/20, 11:27
-
TYPO3com voted on patch set 2 V +1 04/30/20, 11:43 Completed build in 15m 44s on Thu, 30 Apr, 11:43 AM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3124
-
Björn Jacob commented on patch set 2 V +1 04/30/20, 12:31
We've got the same problem in one of our installation. We've applied the patch via Composer. Solves our problem and is in production :) I will read the RST as usual and I'm ready for reviewing :) -
Oliver Hader voted on patch set 2 CR +1 04/30/20, 12:37
-
Benni Mack uploaded patch set 3 04/30/20, 14:38
-
Björn Jacob updated the commit message in patch set 4 04/30/20, 14:49
-
Björn Jacob commented on patch set 5 04/30/20, 14:58
Published edit on patch set 4. -
Björn Jacob voted on patch set 5 V +1 CR +1 04/30/20, 15:02
-
Alexander Grein voted on patch set 5 V +1 CR +1 04/30/20, 15:21
-
Oliver Hader commented on patch set 5 CR +2 04/30/20, 16:27
I would tackle (in terms of "I can create a patch") additional tests in a separate change-set... -
TYPO3com voted on patch set 5 V -1 04/30/20, 16:30 Completed build in 18m 59s on Thu, 30 Apr, 04:30 PM Test Summary: 2 of 71752 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3129
-
TYPO3com voted on patch set 5 V +1 05/01/20, 09:11 Completed build in 17h 18m 24s on Fri, 1 May, 09:11 AM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3129
-
Helmut Hummel voted on patch set 5 CR +1 05/01/20, 21:53
-
Helmut Hummel wrote 05/01/20, 22:49
Removed Code-Review+1 by Helmut Hummel <typo3@helhum.io> -
Helmut Hummel commented on patch set 5 05/01/20, 23:02
Unresolved
Not sure, whether this justifies keep everything as is, but the introduced change only added this behaviour when the slug field is configured to be unique in site. I wrapped my head around this and can't imagine a sceario which we are trying to fix, where unique in site for the slug makes sense.Feature-86365-RoutingEnhancersAndAspects.rst:436UnresolvedSlug lookup and their uniquness must be in sync. With the new option in place, "site owners", which use independent news folders from different sites, would need to set TCA for the slug field to be globally unique instead of unique in site. If they must do so anyway to avoid slug conflicts, the code introduced in 9.5.16 will respect that and not limit the news storage to the site. If in such scenario TCA needs to adapted anyway, why add another configuration on top (which always needs to be in sync with TCA)? Is there any scenario, where it makes sense to configure TCA for the slug to be unique in site, but the enhancer not enforcing the news storage to be in the same site? I can't imagine one, but I might be missing something. -
Helmut Hummel commented on patch set 5 CR -1 05/01/20, 23:04
I give my -1 here for now. If I'm missing a reasonable use case, I'm fine with the change though. Otherwise I'd rather advice users to change TCA to cover their use case. -
Helmut Hummel commented on patch set 5 05/01/20, 23:06
Side note: when having a news folder, which is not in a site, having unique in site set in TCA, will happily allow duplicate slugs. So this can't be a reasonable scenario for this TCA setting. -
Helmut Hummel commented on patch set 5 CR -2 05/02/20, 00:28
Ok, I'm getting a bit more rigid after giving this another round of thoughts. First of all, I realize that the initial change caused a breaking behaviour. That is really unfortunate. On the other hand, the current behavior (please correct me if I'm wrong) is technically correct. Adding an additional option to route enhancers will have the following effects: 1. It will fix the sites for people with wrong TCA configuration (unique in site is set, but records presented/ url generated in multiple sites) 2. It will break the sites for people with correct configuration, as they rely on the fix present in the previous release 3. It introduces an option for route enhancers that configures something that needs to be configured in TCA as well (to ensure correct uniques for slugs on record save) As I wrote above, having a global news storage folder, which is not part of a site and having the slug field configured to be uniqe in site, will eventually cause conflicting slugs to be generated. Having one news folder in one site, but serving the news over another site would not cause conflicting slugs. Nevertheless it still is wrong, because for that use case slugs are technically global. It is a bit unfortunate that the News extension initially was released with unique in site as default configuration. My recommendation would be to go with a default that slugs need to globally unique, which will always work, but the urls can be optimised for the special use case when the same slug is needed to be used in different sites. Again: I'm happy to remove my -2 here again, when all of the above is considered, but a different conclusion is made. -
Helmut Hummel commented on patch set 5 CR -1 05/04/20, 13:46
Talked with Benni. Our solution now is to introduce a global feature switch. Benefits: Exiting installations with the global use case get their intallation fixed New installations need to take care to set proper TCA Extension authors can release an extension version respecting the switch and going with unique instead of unique in site by default, without this being a major breaking change. Still unfortunate: People relying on the existence of this fix, will have to turn the feature switch after update to the new bugfix version I think though that this is a good compromise. Therefore removing my -2 -
Oliver Hader commented on patch set 5 05/04/20, 14:01
> Patch Set 5: Code-Review-1 > > Talked with Benni. > > Our solution now is to introduce a global feature switch. I see the point of having a feature switch - but... The switch controls a global behaviour, but for persisted mappers is really depends on the specific implementation for a particular database table name. Thus, I'd still be in favour of having a new property in route configuration (which is a manual step in order to enable the feature - similar to a feature toggle)... -
Oliver Hader voted on patch set 5 CR +1 05/04/20, 14:01
-
Guido Schmechel commented on patch set 5 V +1 CR +1 05/04/20, 19:43
Tested with 10.4.1. News detail page work again :-) -
Helmut Hummel commented on patch set 5 05/04/20, 20:23
> Patch Set 5: > I see the point of having a feature switch - but... > > The switch controls a global behaviour, but for persisted mappers is really depends on the specific implementation for a particular database table name. Thus, I'd still be in favour of having a new property in route configuration (which is a manual step in order to enable the feature - similar to a feature toggle)... Not sure if you read my comments on why I actually voted -2 before? Maybe I did not make my point clear enough. Let me re-phrase: The specific mappers only make sense with a slug field. And this slug field is defined in TCA and in this TCA slug field configuration the de-dpulication behaviour is configured, which can be "unique" or "uniqueInSite". The de-duplication behaviour for slugs is a requirement for persisted mappers to be able to properly resolve exactly one record from a slug. If editors are able to create duplicate slugs, everything would blow up. With only these two options of de-duplication defined in TCA, which is GLOBAL configuration, I don't see the point in introducing a non global option for persisted mappers, which in fact MUST be in sync with the globally defined de-duplication behaviour. The use case that broke and lead to this attempt to fix it, was slug configured "uniqueInSite" in TCA but news records were used across multiple sites. Depending on how many use folders were used, it isn't unlikely, that some slugs might have duplicates, leading to errors, because the de-duplication on save is configured to allow duplicates, when the records are stored are in different sites, but URLs generated on one site. So, IF there is any bug, it's News having "uniqueInSite" delivered by default and people using this default for non fitting use cases. I might be wrong. Please enlighten me what I'm missing here. -
Helmut Hummel commented on patch set 5 05/04/20, 20:24
> Patch Set 5: Verified+1 Code-Review+1 > > Tested with 10.4.1. News detail page work again :-) I'd rather reconned to change TCA so that slugs are checked to be globally unique -
Helmut Hummel commented on patch set 5 05/04/20, 20:26
> Patch Set 5: > > > Patch Set 5: Verified+1 Code-Review+1 > > > > Tested with 10.4.1. News detail page work again :-) > > I'd rather reconned to change TCA so that slugs are checked to be globally unique s/reconnedrecommend/ -
Henrik Ziegenhain commented on patch set 5 05/05/20, 13:05
Works also for 9.5 - not voting for now because of pending decision about Feature Toggles -
Benni Mack uploaded patch set 6 05/05/20, 18:44
-
TYPO3com voted on patch set 6 V +1 05/05/20, 18:55 Completed build in 11m 22s on Tue, 5 May, 06:55 PM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3216
-
Helmut Hummel commented on patch set 6 05/05/20, 20:07
PersistedAliasMapper.php:53should be removedPersistedPatternMapper.php:54should be removedDefaultConfiguration.php:75should be false -
Helmut Hummel commented on patch set 7 05/05/20, 20:10
Published edit on patch set 6. -
Helmut Hummel commented on patch set 7 05/05/20, 20:11
PersistedAliasMapper.php:53ReplyDonePersistedPatternMapper.php:54ReplyDoneDefaultConfiguration.php:75ReplyDone -
Helmut Hummel voted on patch set 7 V +1 CR +1 05/05/20, 20:15
-
TYPO3com voted on patch set 7 V +1 05/05/20, 20:22 Completed build in 12m 34s on Tue, 5 May, 08:22 PM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3221
-
Helmut Hummel commented on patch set 7 CR -2 05/06/20, 11:50
Sorry for the back and forth. With a ext News now being in the process of being released, that changes the slug behaviour to be "unique", I think this change can be omitted. Will diskuss this with Benni (again) -
Helmut Hummel commented on patch set 7 05/08/20, 14:09
I'd abandon this one and prefer this change instead: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64428 -
Helmut Hummel abandoned the change 05/12/20, 21:06
Now fixed differently