FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
189 stars 232 forks source link

Have trouble getting images from pages or content elements (FAL). #394

Closed wbeeftink closed 11 years ago

wbeeftink commented 11 years ago

Hey guys, I'm unsure if this is an issue with vhs or TYPO3/FAL but I have trouble showing images from pages or content elements.

<v:uri.image src="{v:page.info(pageUid: 37, field: 'media')}" treatIdAsReference="1" />

The above is what I tried but it throws this error:

#1317178794: No fileusage (sys_file_reference) found for given UID.

The page with uid 37 does have an image relation set under the resource tab. When checking out the pages table it shows value 1 in the column media. I'm unsure if it's relevant but the record in sys_file_reference with pid 37 has uid 12.

I hope that made sense! I'm not good at explaining the technical stuff ;) I'm trying out vhs in a project and so far it's awesome. I don't know how I've created projects in the past without vhs :)

danilobuerger commented 11 years ago

Hey @wbeeftink

the media field in pages is the count of associated media not the actual uid. You will have to get the actual uid from sys_file_reference instead and use that as your src.

If you need anymore assistance you are welcome to join our support chat on freenode: #fedext (https://fedext.net/support-chat.html)

danilobuerger commented 11 years ago

Fixed by #395