Review main Merged

90996[BUGFIX] Fix valuePicker for TCA type=link

Oli Bartsch CR +2 V +2 Easy +36 −3 updated 10/13/25, 15:37

Commit message

The valuePicker option for TCA type=link
does now properly work by using the correct
array keys ('label' / 'value') of the items.

Additionally, the display is fixed by
utilizing correct classes for proper
border assignment.

Styleguide is extended for examples.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Josua Vogel +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Josua Vogel +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 1214

  1. Oli Bartsch uploaded patch set 1 10/10/25, 13:20

  2. core-ci voted on patch set 1 V +1 10/10/25, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86405

  3. Josua Vogel voted on patch set 1 CR +1 V +1 10/11/25, 14:56

  4. Benjamin Franzke commented on patch set 1 CR -1 10/12/25, 13:05

    LinkElement.php:187

    I can't explain why valuePicker for type=link uses 0/1 indexes currently, but changing this is actually breaking and documentation actually refers to an array-list instead of `label`/`value` for type=link: https://docs.typo3.org/permalink/t3tca:confval-link-valuepicker ``` 'valuePicker' => [ 'items' => [ ['HTTPS', 'https://';], ['HTTP', 'http://';], ], ], ``` You could make this a task that supports `value`/`label` alternatively, in order to streamline with `valuePicker` definition style on other TCA types, but 0/1 needs to stay in v13.
  5. Stefan Bürk commented on patch set 1 10/12/25, 17:47

    LinkElement.php:187 Reply

    Cannot find `link_6` from issue screenshot in core main/13.4 in styleguide, so I assume that was a "try" to add it. valuePicker transformation form 0/1 to label|value has been done for 14.0 only with https://review.typo3.org/c/Packages/TYPO3.CMS/+/88644 and I'd say that the LinkElement has been missed to adopt. Following that, this change should do this only for main and modify the changelog from the other change to complete it. The tca migration includes simply looks for "valuePicker" on a TCA element, and I guess we need to change that to narrow down to the tcaTypes supporting valuePicker ... @bo@cedev.de can you elaborate why you targeted the change also for 13.4 ? As @ben@bnf.dev already mentioned, for 13.4 this should not change to `label/value` and instead guard the access for 0/1 to avoid array key access errors instead (as bugfix). Due to the different approach, I would first do the "bugfix" albeit broken for v14 and doing the adoption/change to label/value as a dedicated followup fix/change extending the rest-file from the other change.
  6. Oli Bartsch updated the commit message in patch set 2 CR +1 V +1 10/13/25, 05:51

  7. Oli Bartsch commented on patch set 2 10/13/25, 05:55

    LinkElement.php:187 Reply

    You are completely right, this only targets 14.0. Sorry for the confusion. Migration is working fine that's why LinkElement did no longer work because 0/1 is transformed to label/value and LinkElement still accessed old integer key. This is now fixed. No need to update the rst as the types are not explicitly mentioned there.
  8. Josua Vogel voted on patch set 2 CR +1 V +1 10/13/25, 05:56

  9. core-ci voted on patch set 2 V +1 10/13/25, 05:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86511

  10. Stefan Bürk voted on patch set 2 CR +1 V +1 10/13/25, 15:28

  11. Benni Mack voted on patch set 2 CR +1 10/13/25, 15:30

  12. Benni Mack voted on patch set 2 V +1 10/13/25, 15:31

  13. Oli Bartsch voted on patch set 2 CR +2 V +2 10/13/25, 15:37

  14. Oli Bartsch merged patch set 3 10/13/25, 15:37