82752[BUGFIX] Prevent exception in TranslateViewHelper for modules without short description
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
-
Verified V +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 1
Review log 89
-
Albrecht Köhnlein uploaded patch set 1 01/31/24, 13:35
-
core-ci voted on patch set 1 V +1 01/31/24, 13:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52557
-
Garvin Hicking commented on patch set 1 01/31/24, 16:15
For the curious like me, no, this doesn't work: ``` title="{f:if(condition: subModule.shortDescription, then: '{f:translate(key: \'{subModule.shortDescription}\', default: \'{subModule.shortDescription}\')}', else: '')}" ``` :D -
Albrecht Köhnlein commented on patch set 1 01/31/24, 16:57
Reply
Was also my first idea. But unfortunately no. It did not work. Turned out, the `then` argument was rendered but simply not returned. For this reason, I decided to solve it similar to https://review.typo3.org/c/Packages/TYPO3.CMS/+/77257 -
Garvin Hicking commented on patch set 1 CR +1 V +1 01/31/24, 16:59
Ack! Your patch does work for me. :-)Reply
Acknowledged -
Oli Bartsch commented on patch set 1 01/31/24, 20:38
Modules.html:19Do you know whether an empty title attribute is better than omitting the attribute altogether in case no shortDescription is given? -
Albrecht Köhnlein commented on patch set 1 02/01/24, 07:40
Modules.html:19ReplyAs you can see in this MDN example https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title#title_attribute_inheritance the difference between an empty title attribute and no title attribut is only relevant for inheritance. So in this current case, it does not make a difference. But if you would like to, I could refactor it. But in firt place, I simply decided to solve it like https://review.typo3.org/c/Packages/TYPO3.CMS/+/77257 -
Oli Bartsch commented on patch set 1 CR +2 V +2 02/01/24, 07:47
Modules.html:19ReplyOke, let's make it this way. However, we should anyways reconsider this code as a-tags with empty target are better buttons. But one fix at a time. Thanks for your patch! -
Oli Bartsch merged patch set 2 02/01/24, 07:47