[TYPO3-core] RFC #17385 Bug: LOAD_REGISTER different behaviour since 4.5.0 (depending on ordering)
JoH asenau
info at cybercraft.de
Thu Feb 10 13:25:38 CET 2011
This is an SVN patch request.
Type: Bugfix
Branches: 4.5 and trunk
BT: http://bugs.typo3.org/view.php?id=17385
Problem:
The following TypoScript code returns an "array" string since TYPO3 4.5.
1 = LOAD_REGISTER
1 {
columnItems {
insertData = 1
if.isTrue.field = content
}
columnItems (
<div class="columnItems" style="{register:padding}">
{field:content}
</div>
)
}
After rewriting it for 4.5
1 = LOAD_REGISTER
1 {
columnItems.cObject = TEXT
columnItems.cObject {
if.isTrue.field = content
insertData = 1
value (
<div class="columnItems" style="{register:padding}">
{field:content}
</div>
)
}
}
everything works as expected.
Solution:
This is due to the order of the TS-Setup, since it works as soon as you
move the value definition of the first example in front of the action
"insertData".
According to TSref this should not happen, since the order of settings
is not taken into account.
Changing
$theValue = $this->cObj->stdWrap($theValue, $conf[$registerProperties]);
to
$theValue = $this->cObj->stdWrap($conf[$register],
$conf[$registerProperties]);
fixes the bug.
Attached patch does exatcly this.
Cheers
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 17385.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110210/080d72ce/attachment.asc>
More information about the TYPO3-team-core
mailing list