Skip to content
Snippets Groups Projects
Commit 3efe471d authored by Garvin Hicking's avatar Garvin Hicking Committed by Christian Kuhn
Browse files

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

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).

Resolves: #102760
Related: #97816
Releases: main, 12.4
Change-Id: I6954bcf8f840d9e45372fc8fa8099381ce2b8b76
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84912


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 0596cb3c
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment