Bug #67669
closednoTrimWrap not working with optionSplit
Added by Stefan Neufeind over 9 years ago. Updated 4 months ago.
0%
Description
I've used noTrimWrap in a TMENU together with optionSplit. It worked fine in TYPO3 4.5 but failed after upgrading to 6.2. It turns out to be caused by #20793, which itself aims to be a bugfix. Regression here?
Updated by Jigal van Hemert over 9 years ago
- Status changed from New to Needs Feedback
Can you provide some sample code that shows what you expect to work?
Updated by Stefan Neufeind over 9 years ago
Code that worked fine with a TMENU-rootline-menu on 4.5 is:
stdWrap.noTrimWrap = | |*| | > |
Since it didn't work on 6.2 anymore for the moment I've switched to just "wrap" with optionsplit. As is obvious the spaces needed to become or so then, but it worked fine with wrap instead of noTrimWrap. And it turns out the patch I mentioned caused/causes the problem.
Updated by Alexander Opitz about 9 years ago
- Status changed from Needs Feedback to New
Updated by Jigal van Hemert about 9 years ago
Stefan Neufeind wrote:
Code that worked fine with a TMENU-rootline-menu on 4.5 is:
stdWrap.noTrimWrap = | |*| | > |
Since it didn't work on 6.2 anymore for the moment I've switched to just "wrap" with optionsplit. As is obvious the spaces needed to become or so then, but it worked fine with wrap instead of noTrimWrap. And it turns out the patch I mentioned caused/causes the problem.
OptionSplit takes precedence, so the |*| will turn this into:
first = |
middle = | > |
I'm not surprised that both values will not do what you expect.
In 6.1 and higher you can define a different split character for noTrimWrap and let optionSplit use the usual || and |*| combinations.
Since you mention a rootline menu I guess you want to prefix the second and following items with a '>'.
noTrimWrap = ^^^ |*| ^ > ^^ noTrimWrap.splitChar = ^
This would use the '^' as the split character for the noTrimWrap, while optionSplit uses the |*|
This is documented in the TSreference:
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Stdwrap/Index.html#notrimwrap
Updated by Riccardo De Contardi almost 8 years ago
- Status changed from New to Needs Feedback
- Assignee set to Stefan Neufeind
Hi Stefan,
the behavior reported by Jigal is indeed documented since 6.2; do you think it is sufficient to close this issue? Could you test it? Thank you!
Updated by Alexander Opitz over 7 years ago
- Status changed from Needs Feedback to Closed
- Assignee deleted (
Stefan Neufeind)
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Updated by Rémy DANIEL almost 5 years ago
TYPO3 9.5
I am trying to use noTrimWrap with option split, without success.
You can reproduce it with that piece of TypoScript.
You should have a page tree with at least 3 levels, and viewing a page on the 3rd level.
page = PAGE page.config.admPanel = 0 page.config.disableAllHeaderCode = 1 page.10 = HMENU page.10 { special = rootline special.range = 0|-1 1 = TMENU 1.NO { allStdWrap.noTrimWrap = ^^^ |*| ^ > ^^ allStdWrap.noTrimWrap.splitChar = ^ } }
The expected output should be:
<a href="/">Rootpage</a> > <a href="/level-1">Level 1</a> > <a href="/level-1/level-2">Level 2</a> > <a href="/level-1/level-2/level-3">Level 3</a>
Instead, I see:
<a href="/">Rootpage</a><a href="/level-1">Level 1</a><a href="/level-1/level-2">Level 2</a><a href="/level-1/level-2/level-3">Level 3</a>
It seems that noTrimWrap does not take optionsplit into account at all, and parses only the first part of the string matching the 3 first splitChar only.
The rest of the string is discarded.
I tested with wrap + splitChar, and the optionsplit works well.
Updated by Riccardo De Contardi almost 5 years ago
- Status changed from Closed to New
Updated by Jigal van Hemert almost 5 years ago
Confirmed. https://review.typo3.org/c/Packages/TYPO3.CMS/+/7255/ causes noTrimWrap to not support optionSplit any more. The original patch for #20793 solved conflicts between optionSplit (which assumes that "||" is part of optionSplit) and noTrimWrap by allowing a different splitChar for the latter.
The solution for the problem that noTrimWrap = | || doesn't work should've been to use a different splitChar for noTrimWrap.
The best way would be to revert https://review.typo3.org/c/Packages/TYPO3.CMS/+/7255/ but that would be a breaking change. I don't see a solution to support both things like noTrimWrap = | || and optionSplit at the same time.
Updated by Georg Ringer 4 months ago
- Status changed from New to Closed
hey everyone,
due to the fact that those options are not that widely used anymore and changing things back probably break something else I am closing this issue now