Review main Merged

87484[BUGFIX] Remove redundant overrideChildTca from image fields

Nikita Hovratov CR +2 V +2 Normal +18 −150 updated 12/20/24, 08:19

Commit message

Since #101277 the behavior for file fields was changed to have the full
palette (imageOverlayPalette, audioOverlayPalette, ...) per default.
Now, the old overrideChildTca definitions for image fields can be
removed, greatly simplifying the TCA definition.

Some fields defined the imageOverlayPalette for type "unknown" and
"text" (see #79622, #56884 and #33752). This is obviously a
misconfiguration and will lead to an unusable crop field. The fields
"alternative" and "link" don't make sense either for type text.

For backwards compatibility, this patch adds an intermediate palette
called "extendedBasicOverlayPalette", which keeps the "alternative" and
"link" fields for type unknown, text and application. This workaround
should be removed again in v14.

Styleguide can be safely changed, as it's not API.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 5

Files 8

Review log 1823

  1. Nikita Hovratov uploaded patch set 1 12/14/24, 13:51

  2. core-ci voted on patch set 1 V +1 12/14/24, 13:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71101

  3. Nikita Hovratov uploaded patch set 2 V +1 12/15/24, 16:29

  4. core-ci voted on patch set 2 V +1 12/15/24, 16:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71139

  5. Oli Bartsch commented on patch set 2 CR -1 12/16/24, 11:13

    pages.php:534

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    pages.php:539

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    tt_content.php:327

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    tt_content.php:332

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    tt_content.php:375

    IMO this needs to stay. Default does still define this type with the `basicoverlayPalette`.

    tt_content.php:380

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    pages.php:195

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    pages.php:245

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    tx_styleguide_inline_1n_inline_2_child.php:57

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    tx_styleguide_inline_1n_inline_2_child.php:60

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    tx_styleguide_inline_expand_inline_1_child.php:57

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.

    tx_styleguide_inline_expand_inline_1_child.php:60

    IMO this needs to stay. Default does still define this types with the `basicoverlayPalette`.
  6. Nikita Hovratov commented on patch set 2 12/16/24, 11:45

    pages.php:539 Reply

    And what does it mean if type text uses `imageOverlayPalette`?

    tt_content.php:332 Reply

    And what does it mean if type text uses `imageOverlayPalette`? I mean this should never be the case, as only `common-image-types` are allowed.
  7. Oli Bartsch commented on patch set 2 12/16/24, 14:58

    pages.php:539 Reply

    Did not investigate. Just saw that this would be a change, which based on the commit message does not seem to be intended.
  8. Nikita Hovratov commented on patch set 2 12/16/24, 15:13

    pages.php:539 Reply

    Ok, I'll check if this could be in any case breaking. This looked more like a bug to me than intended behavior (And styleguide should be fine in any circumnstances).
  9. Nikita Hovratov uploaded patch set 3 CR -1 V +1 12/16/24, 15:45

  10. core-ci voted on patch set 3 V +1 12/16/24, 15:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71207

  11. Nikita Hovratov commented on patch set 3 12/16/24, 15:58

    pages.php:539 Reply

    @bo@cedev.de I changed this to BUGFIX now. So: `tt_content.image` -> only allows image types, so undefined and text should never occur. `tt_content.assets` -> only allows media types, so undefined and text should never occur. `pages.og_image/twitter_image` -> only image types allowed. `pages.media` -> now this could theoretically be used as text, but I've never seen this be used other than for images. But even if, the crop field is unusable. Only fields left are `alternative` and `link`. There is a very very small risk, that someone used one of these fields. But I would still go with this as a bugfix. We are still very early in v13 release cycle and if this edge case affects someone, it is very easy to fix with TCA overrides. What do you think? Alternative route: We define another palette, which has everything imageOverlayPalette has, but without `crop`. This would be 100% backwards compatible. But still, these fields only make sense with image, where they are also used by default.
  12. Nikita Hovratov uploaded patch set 4 V +1 12/16/24, 17:21

  13. Nikita Hovratov updated the commit message in patch set 5 12/16/24, 17:24

  14. core-ci voted on patch set 4 V +1 12/16/24, 17:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71215

  15. core-ci voted on patch set 5 V +1 12/16/24, 17:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71216

  16. Nikita Hovratov commented on patch set 5 12/16/24, 17:40

    pages.php:534 Reply

    Done

    pages.php:539 Reply

    Done

    tt_content.php:327 Reply

    Done

    tt_content.php:332 Reply

    Done

    tt_content.php:375 Reply

    Done

    tt_content.php:380 Reply

    Done

    pages.php:195 Reply

    Done

    pages.php:245 Reply

    Done

    tx_styleguide_inline_1n_inline_2_child.php:57 Reply

    Done

    tx_styleguide_inline_1n_inline_2_child.php:60 Reply

    Done

    tx_styleguide_inline_expand_inline_1_child.php:57 Reply

    Done

    tx_styleguide_inline_expand_inline_1_child.php:60 Reply

    Done
  17. Oli Bartsch voted on patch set 5 CR +1 V +1 12/17/24, 10:13

  18. Christian Kuhn commented on patch set 5 12/17/24, 10:53

    pages.php:531

    hmmm. main *is* v14 (or will be). should we maybe change the main version of the patch to leave this out already, but push a v13 version that contains it? do we need additional v14 documentation? in such cases it would be fair to have distinct v13 and v14 versions from the start, since otherwise we'd have to add a follow-up patch to v14 to revome these lines again, don't we?
  19. Nikita Hovratov commented on patch set 5 12/17/24, 11:03

    pages.php:531 Reply

    @lolli@schwarzbu.ch I will do a follow-up patch right after this together with a breaking rst. I think it will be easier to see the difference from v13/v14 this way.
  20. Christian Kuhn commented on patch set 5 12/17/24, 11:40

    pages.php:531 Reply

    Acknowledged
  21. Christian Kuhn voted on patch set 5 CR +1 V +1 12/17/24, 13:38

  22. Oli Bartsch voted on patch set 5 CR +2 V +2 12/20/24, 08:19

  23. Oli Bartsch merged patch set 6 12/20/24, 08:19