IchHabRecht / mask_export

Export your mask elements as extension
GNU General Public License v2.0
45 stars 27 forks source link

Render Section image fails #102

Closed Eumolp closed 7 years ago

Eumolp commented 7 years ago

Hello.

Created a simple CE with repeating elements. Text and one/more image/s. the Mask elements works fine in FE and BE. exporting this element does not work: the fluid template in BACKEND does NOT render the Image

fluid:

<f:for each="{processedRow.tx_testce_teaserboxen}" as="item">
  <div>
    <f:for each="{item.tx_testce_image}" as="file">
        <f:image image="{file}" alt="{file.alternative}" title="{file.title}" width="200" /><br />
        {file.description} / {file.identifier}<br />
    </f:for>
   <f:format.stripTags><f:format.crop maxCharacters="250">{item.tx_contenttmd_bodytext}</f:format.crop></f:format.stripTags>
</div>

This fails with a crash:

The argument "image" was registered with type "object", but is of type "array" in view helper "TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper"

Removing the ...</f:for> works.

What ist the diefference of the MASK and the exported version?

Thank you for your help and/or fixing this issue.

using: T3 V8.7 and the latest export_mask from GIT

Christian

Eumolp commented 7 years ago

use src AND treatIdAsReference="1":

<f:image src="{image.uid}" treatIdAsReference="1" />

-) Thankyou for reading

taunusweb commented 7 years ago

Hi @Eumolp , sorry for commenting here, but I ran into the same problem, but your solution isn't working in my case, I'm sure, that I make something wrong... Can you please post your whole working code, I want to look to the "<f:for each" section that's surrounding the "<f:image" Thanks in Advance Uli

IchHabRecht commented 7 years ago

Hi Ulrich,

Would you mind to share you code (maybe even in a new issue) to find your problem?

taunusweb commented 7 years ago

Hi, this is the generated Code: `

</f:for> </f:if>` My Problem: How to get the Preview Image.

IchHabRecht commented 7 years ago

Hi Ulrich,

you should get your preview image with <f:image src="{item.uid}" treatIdAsReference="1" />

taunusweb commented 7 years ago

Yes, that works, but why now? I swear, I tried this before... ;) Thanks a lot!