59167[FEATURE] Fallback options for slug fields
Commit message
Review
-
Code review CR +2 Done
- Anja Leichsenring +2
- Sebastian Rosskopf +1
- Martin Kutschker +1
- André Buchmann +1
-
Verified V +2 Done
- Anja Leichsenring +2
- Sebastian Rosskopf +1
- André Buchmann +1
- TYPO3com +1 CI
Issues 1
Files 4
- typo3/sysext/backend/Classes/Form/Element/InputSlugElement.php+7 −2
- typo3/sysext/core/Classes/DataHandling/SlugHelper.php2+15 −5
- typo3/sysext/core/Documentation/Changelog/9.5.x/Feature-87085-FallbackOptionsForSlugFields.rst3new+57 −0
- typo3/sysext/core/Tests/Unit/DataHandling/SlugHelperTest.php7+132 −0
Review log 4255
Show 2130 earlier messages
-
Guido Schmechel uploaded patch set 1 12/16/18, 11:41
-
Guido Schmechel uploaded patch set 2 12/16/18, 11:41
-
Guido Schmechel uploaded patch set 3 12/16/18, 11:47
-
TYPO3com voted on patch set 1 V +1 12/16/18, 11:53 Completed build in 12m 34s on Sun, 16 Dec, 12:53 PM Test Summary: 48776 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30736
-
TYPO3com voted on patch set 2 V +1 12/16/18, 11:54 Completed build in 12m 19s on Sun, 16 Dec, 12:54 PM Test Summary: 48776 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30737
-
TYPO3com voted on patch set 3 V +1 12/16/18, 11:58 Completed build in 10m 46s on Sun, 16 Dec, 12:58 PM Test Summary: 48776 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30738
-
Guido Schmechel uploaded patch set 4 12/16/18, 16:25
-
TYPO3com voted on patch set 4 V +1 12/16/18, 16:35 Completed build in 10m 35s on Sun, 16 Dec, 05:35 PM Test Summary: 48776 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30742
-
Guido Schmechel uploaded patch set 5 12/16/18, 16:44
-
TYPO3com voted on patch set 5 V +1 12/16/18, 16:55 Completed build in 10m 19s on Sun, 16 Dec, 05:55 PM Test Summary: 48780 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30743
-
Mathias Brodala commented on patch set 5 12/17/18, 09:54
-
Guido Schmechel commented on patch set 5 12/17/18, 10:39
SlugHelperTest.php:479ReplyHopefully I understand you correct: Multiple Array is used for combining fields. See: https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Slug.html#generatoroptions 'Field A', 'Field C' => "slugA-slugC" 'Field A // Field B', 'Field C' => "slugA-slugC" OR "slugB-slugC" -
Mathias Brodala commented on patch set 5 12/17/18, 10:44
SlugHelperTest.php:479ReplyAh yes indeed, forgot about that. In this case I'd still prefer an array approach: fields => [ 'field1', ['field2', 'otherfield2'] ] So basically a nested array. This way we can avoid string parsing. -
Guido Schmechel commented on patch set 5 12/17/18, 10:50
> Patch Set 5: > > (1 comment)SlugHelperTest.php:479ReplySounds good :-) And this is more readable for you then a "new" fallback Option? Example: 'generatorOptions' => [ 'field' => ['title', 'subtitle'] 'fieldFallback => [null, 'nav_title'] ]; Just searching for the best integrator solution. -
Mathias Brodala commented on patch set 5 12/17/18, 11:06
SlugHelperTest.php:479ReplyOf course it's not that nice to read. But a separate option would be unclear to what field the fallback applies. Having to fill up empty placeholders ain't that nice either. -
Guido Schmechel commented on patch set 5 12/17/18, 11:56
SlugHelperTest.php:479ReplyThanks for your feedback. I will rewrite the patch and then we wait for further feedback. -
Guido Schmechel voted on patch set 5 CR -1 12/17/18, 12:48
-
Guido Schmechel uploaded patch set 6 12/17/18, 21:17
-
TYPO3com voted on patch set 6 V +1 12/17/18, 21:28 Completed build in 11m 05s on Mon, 17 Dec, 10:28 PM Test Summary: 48796 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30779
-
Guido Schmechel commented on patch set 6 12/17/18, 21:52
SlugHelperTest.php:529UnresolvedHmpf! -
Benjamin Gries voted on patch set 6 V +1 CR +1 01/08/19, 10:49
-
Guido Schmechel uploaded patch set 7 01/08/19, 22:08
-
TYPO3com voted on patch set 7 V +1 01/08/19, 22:17 Completed build in 08m 57s on Tue, 8 Jan, 11:17 PM Test Summary: 47665 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-31351
-
Benni Mack commented on patch set 7 01/09/19, 13:49
RST file must go in "9.5.x" folder -
Guido Schmechel uploaded patch set 8 01/12/19, 08:12
-
TYPO3com voted on patch set 8 V -1 01/12/19, 08:23 Completed build in 10m 46s on Sat, 12 Jan, 09:23 AM Test Summary: 47675 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-31467
-
Guido Schmechel uploaded patch set 9 01/13/19, 22:41
-
TYPO3com voted on patch set 9 V +1 01/13/19, 22:51 Completed build in 09m 05s on Sun, 13 Jan, 11:51 PM Test Summary: 47675 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-31474
-
Jörg Bösche voted on patch set 9 CR +1 01/31/19, 14:59
-
Benjamin Gries voted on patch set 9 V +1 CR +1 02/01/19, 08:20
-
Josef Glatz commented on patch set 9 CR -1 02/01/19, 09:59
Feature-87085-FallbackOptionsForSlugFields.rst:38Please describe how such a configuration will change an url in addition to the code examples. Like a url example before and after. -
Benjamin Gries voted on patch set 9 V -1 CR -1 02/01/19, 20:35
-
Josef Glatz uploaded patch set 10 02/05/19, 06:42
-
Josef Glatz rebased onto patch set 11 02/05/19, 06:45
-
Josef Glatz commented on patch set 11 02/05/19, 06:46
Fixed RsT document: - added correct intendation tabs to spaces - add examples table -
TYPO3com voted on patch set 10 V +1 02/05/19, 06:58 Completed build in 15m 11s on Tue, 5 Feb, 07:57 AM Test Summary: 46445 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32040
-
TYPO3com voted on patch set 11 V +1 02/05/19, 07:00 Completed build in 14m 53s on Tue, 5 Feb, 08:00 AM Test Summary: 46445 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32041
-
Guido Schmechel voted on patch set 11 V +1 CR +1 02/09/19, 14:16
-
Guido Schmechel wrote 02/11/19, 12:24
Removed Verified+1 by Guido Schmechel <guido.schmechel@brandung.de> -
Guido Schmechel wrote 02/11/19, 12:24
Removed Code-Review+1 by Guido Schmechel <guido.schmechel@brandung.de> -
Mark Kirstein commented on patch set 11 02/12/19, 06:58
I had a similar problem after upgrading to 9.5 from 7.6 with realUrl. RealUrl took the nav_title and if not empty and as fallback the title of page. I solved it with Xclass SlugHelper with a simple extension and two steps: In ext_tables.php set the order of fields: $GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['fields'][0] = 'nav_title'; $GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['fields'][1] = 'title'; In Xclass SlugHelper.php just add a break; within the foreach loop: foreach ($this->configuration['generatorOptions']['fields'] ?? [] as $fieldName) { if (!empty($recordData[$fieldName])) { $pieceOfSlug = $recordData[$fieldName]; $pieceOfSlug = str_replace(array_keys($replaceConfiguration), array_values($replaceConfiguration), $pieceOfSlug); $slugParts[] = $pieceOfSlug; break; } } -
Martin Kutschker commented on patch set 11 02/28/19, 16:05
SlugHelper.php:190Do we need the array explosion here? The documentation of the feature doesn't speak of it. And I do't think we need to support both comma separated lists and arrays.Feature-87085-FallbackOptionsForSlugFields.rst:27Unresolved"other fields" instead of "a second field" AFAIK the number is not limitedFeature-87085-FallbackOptionsForSlugFields.rst:34Unresolveda closing ] is missing -
Guido Schmechel commented on patch set 11 02/28/19, 18:15
SlugHelper.php:190Reply UnresolvedHi Martin, this is processed because we can still have single fields as a string. e.g. 'title'. The new feature introduce the possibillity to handle an array ['field1', 'field2']. But we don't want to loose the original string processing to avoid a breaking change. -
Guido Schmechel uploaded patch set 12 02/28/19, 18:22
-
TYPO3com voted on patch set 12 V +1 02/28/19, 18:36 Completed build in 13m 51s on Thu, 28 Feb, 07:36 PM Test Summary: 46617 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32425
-
Martin Kutschker voted on patch set 12 CR +1 02/28/19, 21:15
-
André Buchmann voted on patch set 12 CR +1 03/01/19, 13:48
-
Sebastian Rosskopf voted on patch set 12 CR +1 03/01/19, 13:56
-
Anja Leichsenring commented on patch set 13 03/01/19, 14:15
Published edit on patch set 12. -
Martin Kutschker voted on patch set 13 CR +1 03/01/19, 14:18
-
André Buchmann voted on patch set 13 V +1 CR +1 03/01/19, 14:32
-
Sebastian Rosskopf voted on patch set 13 V +1 CR +1 03/01/19, 14:32
-
TYPO3com voted on patch set 13 V +1 03/01/19, 14:51 Completed build in 31m 21s on Fri, 1 Mar, 03:51 PM Test Summary: 46641 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32462
-
Anja Leichsenring voted on patch set 13 V +2 CR +2 03/01/19, 15:10
-
Anja Leichsenring merged patch set 14 03/01/19, 15:10
SlugHelperTest.php:479