61716[BUGFIX] Allow slug recreation if postModifiers are defined
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Oli Bartsch +1
- Anja Leichsenring +1
-
Verified V +2 Done
- Georg Ringer +2
- Oli Bartsch +1
- Anja Leichsenring +1
- TYPO3com +1 CI
Issues 1
Files 3
Review log 3758
Show 1933 earlier messages
-
Elias Häußler uploaded patch set 1 09/17/19, 11:15
-
TYPO3com voted on patch set 1 V -1 09/17/19, 11:28 Completed build in 12m 41s on Tue, 17 Sep, 11:28 AM Test Summary: 1 of 47915 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36502
-
TYPO3com voted on patch set 1 V +1 09/17/19, 11:54 Completed build in 51m 42s on Tue, 17 Sep, 11:54 AM Test Summary: 47556 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36502
-
Joerg Kummer commented on patch set 1 V +1 09/23/19, 20:21
Tested with single field of kind of inline. Do we need to test with such mentioned postModifier too? I'll add a test case as a small extension, where TCA can simply manipulated for this case. -
Elias Häußler uploaded patch set 2 01/25/20, 17:46
-
TYPO3com voted on patch set 2 V +1 01/25/20, 17:56 Completed build in 09m 17s on Sat, 25 Jan, 05:56 PM Test Summary: 70582 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40233
-
Susi Moog commented on patch set 2 01/26/20, 08:42
while I do understand the intention, testing now frequently writes "undefined" into the slug. Yes, the postModifier could take care of that, hower imho there should never be "undefined" in the slug field. It should behave like it does with other fields: for example if you use subtitle for generation and subtitle is empty, the slug will be something like "default-2ed13b4da3" - this should also happen here if TYPO3 is unable to get something useful from the inline relation. The post modifier can then still take care of modifying the slug but the behaviour would be consistent. -
Susi Moog voted on patch set 2 V -1 01/26/20, 08:42
-
Elias Häußler wrote 01/27/20, 19:36
Topic set to TCA -
Elias Häußler wrote 01/27/20, 19:36
Topic TCA removed -
Elias Häußler wrote 01/27/20, 19:36
Topic set to Slug -
Elias Häußler uploaded patch set 3 01/27/20, 20:05
-
Elias Häußler updated the commit message in patch set 4 01/27/20, 20:06
-
Elias Häußler commented on patch set 4 01/27/20, 20:08
> Patch Set 2: > > while I do understand the intention, testing now frequently writes "undefined" into the slug. Yes, the postModifier could take care of that, hower imho there should never be "undefined" in the slug field. It should behave like it does with other fields: for example if you use subtitle for generation and subtitle is empty, the slug will be something like "default-2ed13b4da3" - this should also happen here if TYPO3 is unable to get something useful from the inline relation. The post modifier can then still take care of modifying the slug but the behaviour would be consistent. You're totally right and I fully agree. I tried now to solve it in a more generic way. Slug recreation should still be possible if at least one postModifier is defined who can take care of successful slug generation. This can also be the case if the defined generator fields are not useful for slug creation. What do you think? -
TYPO3com voted on patch set 3 V +1 01/27/20, 20:22 Completed build in 16m 36s on Mon, 27 Jan, 08:22 PM Test Summary: 70600 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40283
-
TYPO3com voted on patch set 4 V +1 01/27/20, 20:27 Completed build in 13m 56s on Mon, 27 Jan, 08:27 PM Test Summary: 70600 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40284
-
Elias Häußler uploaded patch set 5 02/02/20, 18:04
-
TYPO3com voted on patch set 5 V +1 02/02/20, 18:17 Completed build in 12m 23s on Sun, 2 Feb, 06:17 PM Test Summary: 71247 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40486
-
Elias Häußler uploaded patch set 6 02/02/20, 18:18
-
TYPO3com voted on patch set 6 V +1 02/02/20, 18:34 Completed build in 13m 56s on Sun, 2 Feb, 06:34 PM Test Summary: 71247 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40488
-
Elias Häußler uploaded patch set 7 02/03/20, 09:50
-
TYPO3com voted on patch set 7 V -1 02/03/20, 10:04 Completed build in 13m 45s on Mon, 3 Feb, 10:04 AM Test Summary: 70954 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40503
-
TYPO3com voted on patch set 7 V +1 02/03/20, 10:17 Completed build in 10m 38s on Mon, 3 Feb, 10:17 AM Test Summary: 71247 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40505
-
Elias Häußler uploaded patch set 8 02/03/20, 11:10
-
Elias Häußler uploaded patch set 9 02/03/20, 11:11
-
TYPO3com voted on patch set 8 V -1 02/03/20, 11:20 Completed build in 10m 35s on Mon, 3 Feb, 11:20 AM Test Summary: 71247 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40508
-
TYPO3com voted on patch set 9 V +1 02/03/20, 11:25 Completed build in 13m 12s on Mon, 3 Feb, 11:25 AM Test Summary: 71247 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40509
-
Susi Moog rebased onto patch set 10 02/25/20, 19:22
-
TYPO3com voted on patch set 10 V -1 02/25/20, 19:32 Completed build in 10m 22s on Tue, 25 Feb, 07:32 PM Test Summary: 71991 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-703
-
TYPO3com voted on patch set 10 V +1 02/25/20, 19:36 Completed build in 24m 44s on Tue, 25 Feb, 07:36 PM Test Summary: 71997 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-703
-
Benni Mack updated the commit message in patch set 11 05/25/20, 18:43
-
TYPO3com voted on patch set 11 V +1 05/25/20, 19:33 Completed build in 43m 40s on Mon, 25 May, 07:33 PM Test Summary: 73808 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3532
-
Oli Bartsch uploaded patch set 12 09/02/20, 14:11
-
TYPO3com voted on patch set 12 V +1 09/02/20, 14:28 Completed build in 16m 35s on Wed, 2 Sep, 02:28 PM Test Summary: 73162 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5145
-
Oli Bartsch voted on patch set 12 V +1 CR +1 09/02/20, 14:30
-
Anja Leichsenring commented on patch set 12 V -1 09/02/20, 18:01
don't know what I do wrong here, but I do not get the button to be enabled. I just manipulated my pages TCA slug field to listen to the media field. No matter whether or what I save to media, the slug recreation remains disabled. And yes, I cleared all caches and reloaded the backend, several times over. There is also no error in the console. -
Oli Bartsch commented on patch set 12 V 0 CR 0 09/02/20, 21:30
> Patch Set 12: Verified-1 > > don't know what I do wrong here, but I do not get the button to be enabled. > I just manipulated my pages TCA slug field to listen to the media field. No matter whether or what I save to media, the slug recreation remains disabled. > > And yes, I cleared all caches and reloaded the backend, several times over. There is also no error in the console. For me this patch is about having the possibility to recreate slugs by only having postModifiers defined (if e.g. the defined generator field is disabled via TSconfig) - as the commit message reads. This however works as expected. Is an inline field a valid generator field at all, what should be the value for the slug then? Maybe Elias can tell what he actually wanted to achieve here as the commit message does not reflect the linked forge issue. -
Oli Bartsch commented on patch set 12 09/02/20, 21:44
> Patch Set 12: -Verified -Code-Review > > > Patch Set 12: Verified-1 > > > > don't know what I do wrong here, but I do not get the button to be enabled. > > I just manipulated my pages TCA slug field to listen to the media field. No matter whether or what I save to media, the slug recreation remains disabled. > > > > And yes, I cleared all caches and reloaded the backend, several times over. There is also no error in the console. > > For me this patch is about having the possibility to recreate slugs by only having postModifiers defined (if e.g. the defined generator field is disabled via TSconfig) - as the commit message reads. This however works as expected. Is an inline field a valid generator field at all, what should be the value for the slug then? Maybe Elias can tell what he actually wanted to achieve here as the commit message does not reflect the linked forge issue. Ok, found his comment about that: > I tried now to solve it in a more generic way. Slug recreation should still be possible if at least one postModifier is defined who can take care of successful slug generation. This can also be the case if the defined generator fields are not useful for slug creation. This looks reasonable to me as like I already mentioned an inline field doesn't look like it could generate some useful slugs in a generic way like always use the value of inline label field. What do you think, should we go with this solution or change the patch? -
Elias Häußler commented on patch set 12 09/03/20, 18:10
> Patch Set 12: > > > Patch Set 12: -Verified -Code-Review > > > > > Patch Set 12: Verified-1 > > > > > > don't know what I do wrong here, but I do not get the button to be enabled. > > > I just manipulated my pages TCA slug field to listen to the media field. No matter whether or what I save to media, the slug recreation remains disabled. > > > > > > And yes, I cleared all caches and reloaded the backend, several times over. There is also no error in the console. > > > > For me this patch is about having the possibility to recreate slugs by only having postModifiers defined (if e.g. the defined generator field is disabled via TSconfig) - as the commit message reads. This however works as expected. Is an inline field a valid generator field at all, what should be the value for the slug then? Maybe Elias can tell what he actually wanted to achieve here as the commit message does not reflect the linked forge issue. > > Ok, found his comment about that: > > > I tried now to solve it in a more generic way. Slug recreation should still be possible if at least one postModifier is defined who can take care of successful slug generation. This can also be the case if the defined generator fields are not useful for slug creation. > > This looks reasonable to me as like I already mentioned an inline field doesn't look like it could generate some useful slugs in a generic way like always use the value of inline label field. > > What do you think, should we go with this solution or change the patch? You're right, Oliver. My intention was to allow re-generation of slugs from the Backend if postModifiers are defined for the slug field as they're fully capable to re-generate those slugs in a meaningful way. Without the patch, one can never re-generate an existing slug from the Backend if only inline fields are defined as generatorFields. This might for example be the case if a sys_file_reference is used as generatorField whose title is used in a registered postModifier for generation of the slug. -
Anja Leichsenring commented on patch set 12 09/03/20, 19:03
> Patch Set 12: > > > Patch Set 12: > > > > > Patch Set 12: -Verified -Code-Review > > > > > > > Patch Set 12: Verified-1 > > > > > > > > don't know what I do wrong here, but I do not get the button to be enabled. > > > > I just manipulated my pages TCA slug field to listen to the media field. No matter whether or what I save to media, the slug recreation remains disabled. > > > > > > > > And yes, I cleared all caches and reloaded the backend, several times over. There is also no error in the console. > > > > > > For me this patch is about having the possibility to recreate slugs by only having postModifiers defined (if e.g. the defined generator field is disabled via TSconfig) - as the commit message reads. This however works as expected. Is an inline field a valid generator field at all, what should be the value for the slug then? Maybe Elias can tell what he actually wanted to achieve here as the commit message does not reflect the linked forge issue. > > > > Ok, found his comment about that: > > > > > I tried now to solve it in a more generic way. Slug recreation should still be possible if at least one postModifier is defined who can take care of successful slug generation. This can also be the case if the defined generator fields are not useful for slug creation. > > > > This looks reasonable to me as like I already mentioned an inline field doesn't look like it could generate some useful slugs in a generic way like always use the value of inline label field. > > > > What do you think, should we go with this solution or change the patch? > > You're right, Oliver. My intention was to allow re-generation of slugs from the Backend if postModifiers are defined for the slug field as they're fully capable to re-generate those slugs in a meaningful way. > > Without the patch, one can never re-generate an existing slug from the Backend if only inline fields are defined as generatorFields. This might for example be the case if a sys_file_reference is used as generatorField whose title is used in a registered postModifier for generation of the slug. and this is what does not work for me or what I did wrong. Are there any prerequisites when using the media field on table pages as the only generator option, e.g. the title field of the reference has to be set? I am all in for having the behavior improved, but please give me the chance to fully understand what I am voting for. Current state: I don't get the enabled recreate slug button. -
Oli Bartsch commented on patch set 12 V +1 CR +1 09/04/20, 06:50
> Patch Set 12: > > > Patch Set 12: > > > > > Patch Set 12: > > > > > > > Patch Set 12: -Verified -Code-Review > > > > > > > > > Patch Set 12: Verified-1 > > > > > > > > > > don't know what I do wrong here, but I do not get the button to be enabled. > > > > > I just manipulated my pages TCA slug field to listen to the media field. No matter whether or what I save to media, the slug recreation remains disabled. > > > > > > > > > > And yes, I cleared all caches and reloaded the backend, several times over. There is also no error in the console. > > > > > > > > For me this patch is about having the possibility to recreate slugs by only having postModifiers defined (if e.g. the defined generator field is disabled via TSconfig) - as the commit message reads. This however works as expected. Is an inline field a valid generator field at all, what should be the value for the slug then? Maybe Elias can tell what he actually wanted to achieve here as the commit message does not reflect the linked forge issue. > > > > > > Ok, found his comment about that: > > > > > > > I tried now to solve it in a more generic way. Slug recreation should still be possible if at least one postModifier is defined who can take care of successful slug generation. This can also be the case if the defined generator fields are not useful for slug creation. > > > > > > This looks reasonable to me as like I already mentioned an inline field doesn't look like it could generate some useful slugs in a generic way like always use the value of inline label field. > > > > > > What do you think, should we go with this solution or change the patch? > > > > You're right, Oliver. My intention was to allow re-generation of slugs from the Backend if postModifiers are defined for the slug field as they're fully capable to re-generate those slugs in a meaningful way. > > > > Without the patch, one can never re-generate an existing slug from the Backend if only inline fields are defined as generatorFields. This might for example be the case if a sys_file_reference is used as generatorField whose title is used in a registered postModifier for generation of the slug. > > and this is what does not work for me or what I did wrong. Are there any prerequisites when using the media field on table pages as the only generator option, e.g. the title field of the reference has to be set? > I am all in for having the behavior improved, but please give me the chance to fully understand what I am voting for. > Current state: I don't get the enabled recreate slug button. Maybe this helps. My test cases were: // Overrides/pages.php $GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['fields'] = ['media']; $GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['postModifiers'][] = \Vendor\Ext\Hooks\SlugPostModifier::class . '->modify'; // SlugPostModifier.php class SlugPostModifier { public function modify($parameters, SlugHelper $slugHelper): string { return $parameters['slug'] . '-fobar'; } } I also tested including some TSconfig: // Overrides/pages.php $GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['fields'] = ['title, media']; $GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['postModifiers'][] = \Vendor\Ext\Hooks\SlugPostModifier::class . '->modify'; // TSconfig TCEFORM.pages.title.disabled = 1 Both are working no and do not without the patch. -
Oli Bartsch uploaded patch set 13 09/04/20, 10:32
-
Oli Bartsch commented on patch set 13 09/04/20, 10:35
@Elias @Anja I found another place which IMO had to be adjusted. EditDocumentController automatically adds slug generator fields to columnsOnly if they were not set there. This is not needed anymore if a postModifier is defined for this field. Please have a look. -
TYPO3com voted on patch set 13 V +1 09/04/20, 10:44 Completed build in 11m 54s on Fri, 4 Sep, 10:44 AM Test Summary: 73200 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5227
-
Oli Bartsch uploaded patch set 14 10/02/20, 15:39
-
TYPO3com voted on patch set 14 V -1 10/02/20, 16:34 Completed build in 25m 15s on Fri, 2 Oct, 04:34 PM Test Summary: 1 of 74220 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6211
-
Oli Bartsch uploaded patch set 15 10/02/20, 17:20
-
TYPO3com voted on patch set 15 V -1 10/02/20, 17:45 Completed build in 19m 33s on Fri, 2 Oct, 05:45 PM Test Summary: 73735 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6221
-
Oli Bartsch uploaded patch set 16 10/02/20, 18:34
-
TYPO3com voted on patch set 16 V -1 10/02/20, 18:56 Completed build in 22m 05s on Fri, 2 Oct, 06:56 PM Test Summary: 1 of 74220 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6222
-
TYPO3com voted on patch set 16 V +1 10/02/20, 23:11 Completed build in 13m 56s on Fri, 2 Oct, 11:11 PM Test Summary: 73734 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6228
-
Oli Bartsch uploaded patch set 17 10/13/20, 07:28
-
TYPO3com voted on patch set 17 V +1 10/13/20, 07:43 Completed build in 15m 12s on Tue, 13 Oct, 07:43 AM Test Summary: 73716 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6462
-
Oli Bartsch voted on patch set 17 V +1 CR +1 10/13/20, 08:16
-
Oli Bartsch commented on patch set 17 10/13/20, 08:48
See forge for an example to test. -
Anja Leichsenring voted on patch set 17 V +1 CR +1 11/03/20, 18:29
-
Georg Ringer voted on patch set 17 V +2 CR +2 11/03/20, 22:32
-
Georg Ringer merged patch set 18 11/03/20, 22:32