Project

General

Profile

Actions

Bug #100936

open

Label for custom category in constant editor is not used

Added by Karsten Nowak (undkonsorten) over 1 year ago. Updated 3 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2023-05-31
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Related to TYPO3 Core - Bug #103088: Constant editor - categorization and listing brokenClosed2024-02-09

Actions
Actions #1

Updated by Oliver Hader over 1 year ago

  • Category set to TypoScript
Actions #2

Updated by Benni Mack over 1 year ago

  • Sprint Focus set to Stabilization Sprint
Actions #3

Updated by Christian Weiske 11 months ago

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.

Actions #4

Updated by Christian Weiske 11 months ago

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
}

Actions #5

Updated by Christian Kuhn 5 months ago

Actions #6

Updated by Christian Kuhn 5 months ago

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.

Actions #7

Updated by Garvin Hicking 4 months ago

  • Status changed from New to Needs Feedback

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?

Actions #8

Updated by Lina Wolf 3 months ago

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

```
  1. customcategory=myCategoryBroken=My broken category
    testbroken { # cat=myCategoryBroken/color; type=string; label=Color Broken
    color = orange
    }
  1. customcategory=mycategoryworking=My working category

testworking { # cat=mycategoryworking/color; type=string; label=Color Working
color = orange
}
```

The first does not work, the second works

Actions #9

Updated by Garvin Hicking 3 months ago

  • Related to Bug #103088: Constant editor - categorization and listing broken added
Actions

Also available in: Atom PDF