57185[BUGFIX] Reorder processing of TCA select items again
Commit message
Review
-
Code review CR +2 Done
- Susi Moog +2
- Sascha Rademacher +1
- Jörg Bösche +1
-
Verified V +2 Done
- Susi Moog +2
- Sascha Rademacher +1
- Jörg Bösche +1
- TYPO3com +1 CI
Issues 1
Files 3
Review log 4663
Show 2738 earlier messages
-
Jigal van Hemert uploaded patch set 1 06/11/18, 13:39
-
TYPO3com voted on patch set 1 V -1 06/11/18, 13:51 Completed build in 11m 33s on Mon, 11 Jun, 03:51 PM Test Summary: 3 of 32943 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24332
-
Stefan Froemken commented on patch set 1 V -1 06/27/18, 07:41
Please don't do that. It's up to the integrator to decide what a user has to see or not. If you move the userfunc back down again, an integrator can not remove any generated fields anymore. Have a look at the old TYPO3 versions: https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_4-7/t3lib/class.t3lib_tceforms.php#L1423:L1435 Order was, and should be: Filter, Add, UserFunc, Remove -
Jigal van Hemert commented on patch set 1 06/27/18, 19:39
> Please don't do that. It's up to the integrator to decide what a > user has to see or not. If you move the userfunc back down again, > an integrator can not remove any generated fields anymore. Yes, they can. > Order was, and should be: Filter, Add, UserFunc, Remove Exactly. The previous change move the UserFunc part way up before the Add. itemProcFunc is not only for adding/removing items but also for changing them. One use case had no human readable data in the foreign table so the itemProcFunc changed the labels to something understandable. With this change the UserFunc are after Add (from foreign table) but before Remove (by Page TSconfig). Why would itemProcFunc before Adding from foreign table be the correct place in your opinion? -
Stefan Froemken wrote 07/02/18, 06:48
Removed Verified-1 by Stefan Froemken <froemken@gmail.com> -
Stefan Froemken commented on patch set 1 07/02/18, 06:54
Thank you for your explanation. I have removed my -1 -
Benni Mack rebased onto patch set 2 10/29/18, 09:48
-
Benni Mack commented on patch set 2 10/29/18, 09:49
Hey Jigal, I rebased this patch, but on (related) test fails. Can you fix that so you can re-check the expected behaviour via tests? -
TYPO3com voted on patch set 2 V -1 10/29/18, 10:03 Completed build in 15m 12s on Mon, 29 Oct, 11:03 AM Test Summary: 3 of 38527 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-29804
-
Patrick Broens voted on patch set 2 V +1 CR +1 04/24/19, 19:52
-
Patrick Broens commented on patch set 2 04/24/19, 20:04
Can somebody please have a look at the failed tests? Maybe @jigal -
Patrick Broens commented on patch set 2 V -1 CR -1 04/25/19, 07:09
Although I thought this will solve the issue, it does not. It works for the case of having itemsProcFunc with a foreign_table, but not without the foreign table. In that case the items from the itemsProcFunc are listed, but the selection cannot be saved -
Patrick Broens commented on patch set 2 04/25/19, 08:12
When itemsProcFunc is used without a foreign_table, the results from the itemsProcFunc should be considered as $staticItems. When itemsProcFunc is used with a foreign_table, the results are not static. At least this works for me. The $staticItems / $dynamicItems part is to blame here. -
Tobi Kretschmann commented on patch set 2 07/15/19, 12:20
@Patrick You actually need the foreign_table to be there in order to save and display saved items. IMHO your patchset is correct -
TYPO3com commented on patch set 2 07/15/19, 12:29 Completed build in 13m 01s on Mon, 15 Jul, 02:29 PM Test Summary: 4 of 50982 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-899
-
Tobi Kretschmann commented on patch set 2 07/15/19, 13:57
> Patch Set 2: > > @Patrick > You actually need the foreign_table to be there in order to save and display saved items. > IMHO your patchset is correct Never Mind. I thought, you meant using MM withour foreign_table. Sorry, my bad. -
Oliver Klee commented on patch set 2 07/15/19, 14:45
Can we have regression tests for this to make sure this does not break again? -
Jigal van Hemert commented on patch set 2 07/16/19, 22:07
I think the test \TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaSelectItemsTest::addDataCallsItemsProcFunc() is incorrect. $input = [ 'tableName' => 'aTable', 'databaseRow' => [ 'aField' => 'aValue' ], 'processedTca' => [ is different regarding the `databaseRow` then the expected value later on (line 2672): $expected['databaseRow']['aField'] = ['aValue']; This is exactly what is shown in the bamboo log at https://bamboo.typo3.com/browse/CORE-GTC95-UT0PHP72-899/test/case/136140680: TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaSelectItemsTest::addDataCallsItemsProcFunc Failed asserting that two arrays are identical. --- Expected +++ Actual @@ @@ Array &0 ( 'tableName' => 'aTable' 'databaseRow' => Array &1 ( - 'aField' => Array &2 ( - 0 => 'aValue' - ) + 'aField' => Array &2 () ) 'processedTca' => Array &3 ( 'columns' => Array &4 ( -
Tobi Kretschmann uploaded patch set 3 10/08/19, 15:41
-
TYPO3com voted on patch set 3 V -1 10/08/19, 15:41 Completed build in 12s on Tue, 8 Oct, 03:41 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37152
-
Tobi Kretschmann commented on patch set 3 10/08/19, 15:45
I added another test to proof that this should be handled as a regression fix. I'll add more to test the addData method with other config combinations. -
Tobi Kretschmann uploaded patch set 4 10/09/19, 08:46
-
TYPO3com voted on patch set 4 V -1 10/09/19, 08:47 Completed build in 13s on Wed, 9 Oct, 08:47 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37165
-
Tobi Kretschmann uploaded patch set 5 10/09/19, 08:50
-
TYPO3com voted on patch set 5 V +1 10/09/19, 09:01 Completed build in 10m 44s on Wed, 9 Oct, 09:01 AM Test Summary: 47735 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37166
-
Tobi Kretschmann uploaded patch set 6 10/09/19, 10:17
-
Tobi Kretschmann uploaded patch set 7 10/09/19, 10:30
-
TYPO3com voted on patch set 6 V +1 10/09/19, 10:31 Completed build in 13m 17s on Wed, 9 Oct, 10:31 AM Test Summary: 47739 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37170
-
TYPO3com voted on patch set 7 V +1 10/09/19, 10:47 Completed build in 13m 51s on Wed, 9 Oct, 10:47 AM Test Summary: 47739 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37173
-
Julian Geils voted on patch set 7 CR +1 10/09/19, 11:10
-
Sascha Rademacher voted on patch set 7 V +1 CR +1 10/09/19, 11:56
-
Jörg Bösche commented on patch set 7 10/09/19, 14:04
TcaSelectItemsTest.php:2015UnresolvedAdd :void to all your methods in test class.TcaSelectItemsTest.php:2999UnresolvedStart with upper case. "in" to "In".TcaSelectItemsTest.php:3116UnresolvedStart with upper case. "in" to "In". -
Jörg Bösche commented on patch set 7 10/09/19, 14:21
How to test the implementation: 1. Create a new or override an existing TCA configuration (e.g. pages.php -> field: title) 2. Add following configuration to the field: 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'sys_language', 'itemsProcFunc' => \TYPO3\CMS\Core\ItemsProcFunc::class . '->overrideItemsProcFunc', ] 3. Create the Class "\TYPO3\CMS\Core\ItemsProcFunc" with method "overrideItemsProcFunc(array $params)" 4. Unset the original $params['items'] from foreign_table with custom data public function overrideItemsProcFunc(array $parameters): array { $parameters['items'] = [ [ 0 => 'Hello World!!!!', 1 => 12, 2 => '' ] ]; return $parameters; } 4. Output in the backend will be a select single with items "Hello World!!!! [12]" instead of the data from foreign_table. :-) -
Tobi Kretschmann uploaded patch set 8 10/09/19, 15:09
-
TYPO3com voted on patch set 8 V -1 10/09/19, 15:09 Completed build in 17s on Wed, 9 Oct, 03:09 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37190
-
Tobi Kretschmann uploaded patch set 9 10/09/19, 15:13
-
TYPO3com voted on patch set 9 V -1 10/09/19, 15:25 Completed build in 11m 37s on Wed, 9 Oct, 03:25 PM Test Summary: 2 of 48098 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37191
-
TYPO3com voted on patch set 9 V +1 10/09/19, 18:19 Completed build in 08m 41s on Wed, 9 Oct, 06:19 PM Test Summary: 47739 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37195
-
Jörg Bösche voted on patch set 9 V +1 CR +1 10/09/19, 18:20
-
Torben Hansen voted on patch set 9 V +1 CR +1 10/10/19, 05:29
-
Steffen Frese voted on patch set 9 CR +1 10/10/19, 06:10
-
Sascha Rademacher voted on patch set 9 V +1 CR +1 10/10/19, 06:19
-
Susi Moog commented on patch set 9 CR -1 10/10/19, 09:25
TcaSelectItems.php:65the staticItems // dynamicItems part seems weird now. What is the purpose of dynamic vs static items? After this change dynamicItems does not contain the dynamic items anymore rendering it somewhat useless. I'd recommend more research in the history of these lines to figure out what the intended behaviour is. -
Oliver Klee wrote 10/10/19, 09:56
Removed reviewer Oliver Klee. -
Tobi Kretschmann uploaded patch set 10 10/10/19, 14:14
-
TYPO3com voted on patch set 10 V +1 10/10/19, 14:38 Completed build in 24m 01s on Thu, 10 Oct, 02:38 PM Test Summary: 47769 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37218
-
Tobi Kretschmann commented on patch set 10 10/11/19, 07:00
TcaSelectItems.php:65Reply UnresolvedThis is what I found. (please correct me if I am wrong) - The staticItems were temporarily stored to determine the dynamicItems. - The dynamicItems were converted to an array with the itemValues as keys called staticValues - The staticValues array was used to find selected items (stored values in DB) Imho that is not correct, because the selected items not only exists in dynamicItems therefore all items are used to create that array with staticValues thus dynamicItems is obsolete and was removed, thus staticItems is obsolete and was removed as well. All no unit tests were altered for this change. All my manual tests with different rendertypes were successful. -
Susi Moog commented on patch set 10 CR -1 12/20/19, 08:10
is the comment from steve on the 9.5 version fixed here? -
Tobi Kretschmann uploaded patch set 11 01/13/20, 09:04
-
TYPO3com voted on patch set 11 V -1 01/13/20, 09:04 Completed build in 15s on Mon, 13 Jan, 09:04 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39843
-
Tobi Kretschmann uploaded patch set 12 01/13/20, 09:39
-
TYPO3com voted on patch set 12 V -1 01/13/20, 09:46 Completed build in 06m 54s on Mon, 13 Jan, 09:46 AM Test Summary: 69236 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39844
-
TYPO3com commented on patch set 12 01/13/20, 10:29 Completed build in 07m 16s on Mon, 13 Jan, 10:29 AM Test Summary: 68953 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39847
-
TYPO3com commented on patch set 12 01/13/20, 10:44 Completed build in 09m 02s on Mon, 13 Jan, 10:44 AM Test Summary: 69236 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39848
-
TYPO3com voted on patch set 12 V +1 01/13/20, 10:47 Completed build in 08m 54s on Mon, 13 Jan, 10:47 AM Test Summary: 69236 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39849
-
Sascha Rademacher voted on patch set 12 V +1 CR +1 01/13/20, 13:14
-
Sascha Rademacher commented on patch set 12 01/13/20, 14:20
Patchset also Works in TYPO3 9.5 -
Tobi Kretschmann commented on patch set 12 01/13/20, 14:29
> Patch Set 10: Code-Review-1 > > is the comment from steve on the 9.5 version fixed here? Yes, this patchset will make steve's comment obsolete, since $staticitems no longer exist. In my opinion it wasn't used right before. -
Jörg Bösche commented on patch set 12 V +1 CR +1 01/17/20, 08:26
Verified on v10.3.0-dev and v9.5.14 with patchset from master. TCA testing scenarios: - foreign_table - foreign_table + itemsProcFunc (added new items and modified $paramers) - foreign_table + itemsProcFunc + TCEForm additional items - foreign_table + TCEForm additional items - foreign_table + TCEForm additional items + itemsProcFunc - foreign_table + add new items by key 'items' -
Susi Moog voted on patch set 12 V +2 CR +2 01/20/20, 07:40
-
Susi Moog merged patch set 13 01/20/20, 07:40
-
Benni Mack commented on patch set 13 04/02/20, 10:30
Please see https://forge.typo3.org/issues/90925 - there is a regression. Can someone please take care of it, otherwise I fear we have to do a revert of this change. -
Tobi Kretschmann commented on patch set 13 04/02/20, 18:47
> Patch Set 13: > > Please see https://forge.typo3.org/issues/90925 - there is a regression. Can someone please take care of it, otherwise I fear we have to do a revert of this change. I'll take a look at it.