#100936Label for custom category in constant editor is not used
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
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 3
Files 1
History 12
-
Oliver Hader changed category <span data-processor="relativetime" data-value="2023-06-01T08:29:34+00:00" > 06/01/23, 08:29 </span>
-
Benni Mack changed Sprint Focus Stabilization Sprint <span data-processor="relativetime" data-value="2023-06-06T12:49:28+00:00" > 06/06/23, 12:49 </span>
-
Christian Weiske commented <span data-processor="relativetime" data-value="2024-01-04T10:47:30+00:00" > 01/04/24, 10:47 </span>
-
Christian Weiske commented <span data-processor="relativetime" data-value="2024-01-04T10:55:04+00:00" > 01/04/24, 10:55 </span>
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 } -
Christian Kuhn changed Related to #97816 <span data-processor="relativetime" data-value="2024-07-09T21:30:46+00:00" > 07/09/24, 21:30 </span>
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2024-07-09T21:35:00+00:00" > 07/09/24, 21:35 </span>
a) Somebody ™ 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. -
Garvin Hicking commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-07-24T07:54:53+00:00" > 07/24/24, 07:54 </span>I cannot reproduce the problem a) in TYPO3 v12.4.17 or 13.3-main. I used this:
# customcategory=myCategoryBroken=My broken category testbroken { # cat=myCategoryBroken/color; type=string; label=Color Broken color = orange } # customcategory=mycategoryworking=My working category testworking { # cat=mycategoryworking/color; type=string; label=Color Working color = orange }and both options appear in the two accordion tabs. Not sure though what “dropdown” might refer to?
-
Lina Wolf commented <span data-processor="relativetime" data-value="2024-08-25T08:53:18+00:00" > 08/25/24, 08:53 </span>
It seems like a newline is required after the definition of a subcategory or category. Otherwise it will just be ignored starting with TYPO3 v12
```- customcategory=myCategoryBroken=My broken category
testbroken { # cat=myCategoryBroken/color; type=string; label=Color Broken
color = orange
}
- customcategory=mycategoryworking=My working category
testworking { # cat=mycategoryworking/color; type=string; label=Color Working
color = orange
}
```The first does not work, the second works
- customcategory=myCategoryBroken=My broken category
-
Garvin Hicking changed Related to #103088 <span data-processor="relativetime" data-value="2024-08-25T09:19:26+00:00" > 08/25/24, 09:19 </span>
-
Georg Ringer changed Related to #105694 <span data-processor="relativetime" data-value="2024-11-26T06:45:45+00:00" > 11/26/24, 06:45 </span>
-
Rémi Payette commented and changed attached clipboard-202509171224-velso.png <span data-processor="relativetime" data-value="2025-09-17T16:37:48+00:00" > 09/17/25, 16:37 </span>
Typo3 13.4.16, I have this issue in Extension settings.
not working
# customcategory
working properly
# customsubcategory
I went as far as confirming that parseCustomCategoryAndSubCategories function in cms-core/Classes/TypoScript/AST/Visitor/AstConstantCommentVisitor.php
does return my customcategory ( page1 category at the end ) :print_r($this->categories); Array ( [basic] => Array ( [label] => Basic [usageCount] => 0 ) [menu] => Array ( [label] => Menu [usageCount] => 0 ) [content] => Array ( [label] => Content [usageCount] => 0 ) [page] => Array ( [label] => Page [usageCount] => 0 ) [advanced] => Array ( [label] => Advanced [usageCount] => 0 ) [all] => Array ( [label] => All [usageCount] => 0 ) [page1] => Array ( [usageCount] => 0 [label] => Page 1 )but the label is not displayed.
clipboard-202509171224-velso.png -
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-10-18T13:49:45+00:00" > 10/18/26, 13:49 </span>Going through this issue:
- Casing of the category key: could not be reproduced (see note by Garvin Hicking). The key of
customcategoryand the one used incat=are both lowercased byAstConstantCommentVisitor. - Missing empty line after
customcategory: comments are bound to the following node by the TypoScript parser and custom categories are only read from the comments of the root node. As noted by Christian Kuhn, this is not going to change, an empty line after the definition is required. - Labels of
customcategoryin the extension settings: fixed in #105694.
Therefore closing this issue.
If this is still valid for you in v14, please open a new issue and provide information how to reproduce it. Thanks!
- Casing of the category key: could not be reproduced (see note by Garvin Hicking). The key of
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.