#69234f:cObject doesn't work with object properties
Description
Hi there,
i struggled accross a behaviour in the f:cObject ViewHelper that does not let me access the properties of my domain object.
If i do something like this:
Fluid Template
<f:format.raw>
<f:cObject typoscriptObjectPath="plugin.ty_myext.content" data={frontendUser: frontendUser} />
</f:format.raw>
Typoscript
plugin.tx_myext{
content = CONTENT
content{
table = tt_content
select{
where = colPos=1
oderBy = sorting
pidInList = 0
}
stdWrap{
replacement{
10{
search = {%frontendUserFirstName}
replace.dataWrap = {field: frontendUser.firstName}
}
}
}
}
}
The string “{%frontendUserFirstName}” is found and replaced, but the replacement is an empty string instead of the frontend users first name, that is stored in the domain object of type “\TYPO3\CMS\Extbase\Domain\Model\FrontendUser”.
If i do this:
*Fluid Template*
<f:format.raw>
<f:cObject typoscriptObjectPath="plugin.ty_myext.content" data={frontendUserFirstName: frontendUser.firstName} />
</f:format.raw>
Typoscript
plugin.tx_myext{
content = CONTENT
content{
table = tt_content
select{
where = colPos=1
oderBy = sorting
pidInList = 0
}
stdWrap{
replacement{
10{
search = {%frontendUserFirstName}
replace.dataWrap = {field: frontendUserFirstName}
}
}
}
}
}
everything works as expected. There might be a bug on the domain object handling of the f:cObject ViewHelper, because i thought it can handle domain objects in it’s data attribute, as mentioned in the documentation: https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/CObject.html
I am on TYPO3 6.2.15-dev
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.