Bug #23826
closedstdWrap "insertData" does not work anymore if using "override" additionally
0%
Description
Try the following TS:
page.100 = TEXT
page.100 {
value = polly wants {field:uid} cracker(s)
override.cObject = TEXT
override.cObject {
value = smells like teen spirit
if.value = 11
if.equals = 123
}
insertData = 1
}
Expected output would be something like
polly wants 69 cracker(s)
Output is:
polly wants {field:uid} cracker(s)
Now try the following:
page.100 = TEXT
page.100 {
value = polly wants {field:uid} cracker(s)
insertData = 1
}
The output is now correct. So as soon as the override is used it does not work anymore (I have currently not tested whether outher properties produce the same fault)
trunk rev 9195
(issue imported from #M16110)
Files
Updated by Jo Hasenau about 14 years ago
Actually it works with override only, but stops working as soon as an "if" condition is involved, that returns false
So this works:
10 = TEXT
10 {
value = Text with {field:title}
override.cObject = TEXT
override.cObject {
value = Another text with {field:title}
if.value = 11
if.equals = 11
}
insertData = 1
}
while this won't:
10 = TEXT
10 {
value = Text with {field:title}
override.cObject = TEXT
override.cObject {
value = Another text with {field:title}
if.value = 11
if.equals = 123
}
insertData = 1
}
Updated by Jo Hasenau about 14 years ago
I tracked it down to a missing check for recursive or nested stdWrap calls.
So if there is at least one conditional function (if, required, fieldRequired) returning false, the whole rendering process stops after this function and nothing will be executed from that point on.
The attached patch Introduces a variable $this->stdWrapRecursionLevel.
It solves the problem, since the check for $this->stopRendering[$this->stdWrapRecursionLevel] is done within the current stdWrap function call only and doesn't influence the rest of the rendering process anymore.
Updated by Ernesto Baschny about 14 years ago
committed to trunk rev 9195 by Susanne Moog