[TYPO3-mvc] Fluid: Object-Accessor is not always working

Robert Schneider r.schneider at artworx.at
Fri Sep 14 13:14:41 CEST 2012


Hi Claus!

It is a FE template.

I have changed it to:

<h1>{product.title}</h1>
<f:debug>{product}</f:debug>
<f:debug>{imagePath}</f:debug>
<f:debug>{productImage}</f:debug>
<div class="product_picture">
     <f:image src="{imagePath}/{productImage}" alt="{product.title}" />
</div>
<f:debug>{product}</f:debug>
<f:debug>{imagePath}</f:debug>
<f:debug>{productImage}</f:debug>


The output is for both debug sections identical. This is the output:

Extbase Variable Dump
Tx_Forumproducts_Domain_Model_Productprototypepersistent entity (uid=30, 
pid=0)
    productCode => '13.40007.00' (11 chars)
    title => 'Pocket-Bag Mini' (15 chars)
    description => 'Dieser nützliche Begleiter bietet nicht nur eine 
große Werbefläche für I
       hre Botschaft oder Ihr Logo, sondern schont auch noch die Umwelt. 
Drei Plast
       ikbeutel am Stück befinden sich im Inneren und sind stets 
griffbereit, prak
       tisch verstaut in der Hand- oder Hosentasche.' (273 chars)
    dimensions => '6 x 7,2 x 1 cm' (14 chars)
    colors => '' (0 chars)
    quantities => '1/250/500/1000/2500/5000/10000' (30 chars)
    prices => '0,65/0,95/0,89/0,82/0,75/0,71/0,65' (34 chars)
    supplier => 'Emotion Factory' (15 chars)
    top => FALSE
    onStartPage => TRUE
    novelty => TRUE
    category => 'Home & Living' (13 chars)
    imagePaths => 'Emotion Factory/Pocket-Bag_Mini.jpg' (35 chars)
    roundImagePath => 'Emotion Factory/Pocket-Bag_Mini.png' (35 chars)
    uid => 30 (integer)
    _localizedUid => 30 (integer)modified
    _languageUid => 0 (integer)modified
    pid => 0 (integer)
Extbase Variable Dump
'fileadmin/Bilder/Produktbilder' (30 chars)
Extbase Variable Dump
'Emotion Factory/Pocket-Bag_Mini.jpg' (35 chars)


It is not the image view helper that causes troubles. If I do it this 
way it works also fine:

<f:if condition="1"></f:if>
<h1>{product.title}</h1>

What do you think about this?

Robert




Am 14.09.2012 12:45, schrieb Claus Due:
> Hi Robert,
>
>> But the next object accessors work properly. It seems to me that f:image initializes something.
>
> As far as I know this is not the case.
>
> Could you try debugging this by dumping all template variables right before and right after using f:image and see if they match up? If they do match then f:image is not to blame.
>
> Also, are we in FE or BE when this happens?
>
> Cheers,
> Claus
>



More information about the TYPO3-project-typo3v4mvc mailing list