Bug #100936
open
Label for custom category in constant editor is not used
Added by Karsten Nowak (undkonsorten) about 1 year ago.
Updated 8 days ago.
Sprint Focus:
Stabilization Sprint
Description
There are several cases where the label for the custom category is not displayed in the dropdown.
1. if the category key has upper letters
# customcategory=myCategory=My category
in dropdown "my_category" is shown. The "C" will be replaced with "_c"
2. if no empty line follow the definition of the custom category
# customcategory=my_category=My category
myConstant = xy
in dropdown "my_category" is shown. The label will be ignored
- Category set to TypoScript
- Sprint Focus set to Stabilization Sprint
I can confirm that the second issue appears on TYPO3 v12.4.9, and with "customsubcategory".
The label is not used when there is no empty line after the comment.
The reason for that problem is that the comments get attached to the following node by the AST parser.
Category labels are only looked for in the root node comments in v12, while at least in v10 we could declare categories everywhere.
Broken:
# customcategory=test=Test
test {
# cat=test/color; type=string; label=Color
color = orange
}
Works:
# customcategory=test=Test
test {
# cat=test/color; type=string; label=Color
color = orange
}
a) Somebody (tm) could look into the casing issue. If there is some simple fix, we could go for it.
b) The strategy of the comment binding is to bind comments to the scope of the following node.
This will most likely not change, and the scenario "no empty line below custom category definition" is rather hard to fix, I suppose. I think we will rather wait for a full substitution of this doomed "logic in comments" strategy, than trying to fix this detail. Please add an empty line for now.
Also available in: Atom
PDF