Review main Merged

84912[BUGFIX] Fix ext_config_template.txt zero-based category ordering

Garvin Hicking CR +2 V +2 Easy +13 −1 updated 06/30/24, 12:16

Commit message

In the Admin Tools > Settings > Extension Configuration module,
extensions can provide a ext_config_template.txt file.

Comments inside that file dictate where and in which order a
configuration option is listed.

The syntax is:

```
 # cat=SomeCategory//0; type=boolean; label=some config
bar = 0

 # cat=SomeCategory//1; type=boolean; label=other config
baz = 0
```

The parsing routine however could not properly deal with
"0" entries for the input element order because checking
this was using an "falsy" statement instead of allowing
also "0" as a string. In this case, such a zero-based
config element was not displayed.

This is fixed, and an example is added to the EXT:styleguide
extension configuration.

Note that the error would not cause problems when either:

* Another category assignment of another input element
took place before, thus properly initializing
the sort ordering.

* The key did not use "0" as a sorting index, but anything
non-falsy.

* The string "cat=SomeCategory//0" was replaced with
"cat=SomeCategory/0" (thus having an unset sorting key).

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 912

  1. Garvin Hicking uploaded patch set 1 06/25/24, 14:31

  2. core-ci voted on patch set 1 V +1 06/25/24, 14:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60310

  3. Stefan Bürk commented on patch set 1 06/25/24, 15:13

    AstConstantCommentVisitor.php:405

    $subCategoryOrder is trimmed in L398 .. so I'd would rather use `$subCategoryOrder !== ''` here. What do you think ?
  4. Garvin Hicking uploaded patch set 2 V +1 06/28/24, 22:27

  5. Garvin Hicking commented on patch set 2 06/28/24, 22:29

    AstConstantCommentVisitor.php:405 Reply

    I actually had it like that initially and then felt I might be missing something here and changed it to strlen(). With your suggestion in mind I now feel better to do it like that. :-)
  6. core-ci voted on patch set 2 V +1 06/28/24, 22:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60604

  7. Christian Kuhn updated the commit message in patch set 3 V +1 06/28/24, 23:04

  8. core-ci voted on patch set 3 V +1 06/28/24, 23:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60605

  9. Christian Kuhn commented on patch set 3 CR +1 V +1 06/29/24, 14:49

    thank you!
  10. Stefan Bürk voted on patch set 3 CR +1 V +1 06/30/24, 11:43

  11. Christian Kuhn voted on patch set 3 CR +2 V +2 06/30/24, 12:04

  12. Christian Kuhn merged patch set 4 06/30/24, 12:16