Review main Merged

85137[BUGFIX] Read RTE options as string and array

Stefan Froemken CR +2 V +2 Normal +66 −66 updated 03/04/25, 13:03

Commit message

EXT:rte_ckeditor was introduced in TYPO3v8
with a configuration based on YAML. With this,
most options were given in array format, but
because of backwards compatibility to
TSConfig, a lot of options are still also
interpreted as string format.

However, a few options were missing to be
made compatible for both kinds of specification,
either via YAML or TSConfig.

Options like "keepTags", "denyTags", "range" and
"list" (for `fixAttrib`) are now checked for string
and array.

Also, "always=1" is cast to string now to
prevent error in `strtoupper()`.

Converting all values of "list" array to upper
case will now use `array_map` instead of
`array_walk` to prevent calling
`strtoupper` with wrong argument counts.

The tests introduced with #106189 are now
enabled to verify this fixed behaviour.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Benjamin Franzke +1
    • Benni Mack +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 6

Review log 1522

  1. Stefan Froemken uploaded patch set 1 07/05/24, 21:51

  2. Stefan Froemken commented on patch set 1 07/05/24, 21:56

    HtmlParser.php:545

    PHP:array_walk works with array-key AND array-value. So two variables will be send to strtoupper, which will fail as just ONE variable is allowed here. That's why I have switched to array_map.
  3. core-ci voted on patch set 1 V -1 07/05/24, 21:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61067

  4. Stefan Froemken uploaded patch set 2 V -1 07/05/24, 21:58

  5. Stefan Froemken uploaded patch set 3 07/05/24, 22:03

  6. core-ci voted on patch set 2 V -1 07/05/24, 22:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61068

  7. core-ci voted on patch set 3 V +1 07/05/24, 22:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61069

  8. Georg Ringer voted on patch set 3 CR +1 V +1 07/09/24, 15:46

  9. Benni Mack updated the commit message in patch set 4 CR +1 V +1 10/18/24, 13:37

  10. core-ci voted on patch set 4 V -1 10/18/24, 22:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68006

  11. Benni Mack rebased onto patch set 5 V -1 10/24/24, 09:12

  12. core-ci voted on patch set 5 V +1 10/24/24, 09:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68519

  13. Garvin Hicking commented on patch set 5 CR +1 V +1 02/17/25, 17:08

    I've added tests here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/88244 which prove this patch as working, once the failing tests are enabled. I would first like to merge the tests and then this patch. Thank you!

    HtmlParser.php:545 Reply

    Verified broken, fix works.
  14. Benni Mack rebased onto patch set 6 CR +1 V +1 02/28/25, 19:40

  15. core-ci voted on patch set 6 V +1 02/28/25, 19:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74921

  16. Garvin Hicking uploaded patch set 7 V +1 02/28/25, 19:57

  17. core-ci voted on patch set 7 V +1 02/28/25, 20:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74922

  18. Garvin Hicking commented on patch set 7 CR +1 V +1 02/28/25, 20:05

    I have enabled the tests which would fail without this patch to prove it is working as described. However, I have removed the 12.4 backport of this patch, mostly because backporting the tests would be a bit of work, and I feel unsure that at this point of the v12 LTS life-cycle we should not introduce volatility to the TS/YAML parsing. Let me know if that's okay for everyone.
  19. Benni Mack voted on patch set 7 CR +1 V +1 02/28/25, 20:49

  20. Benjamin Franzke commented on patch set 7 CR +1 03/04/25, 11:23

    Thanks for the effort Stefan and Garvin, looks good.
  21. Garvin Hicking voted on patch set 7 CR +2 V +2 03/04/25, 11:29

  22. Garvin Hicking merged patch set 8 03/04/25, 13:03