【发布时间】:2019-06-08 08:06:27
【问题描述】:
我需要在前端显示一张图片。
<div class="col-md-12">
<f:debug>{user.image.0}</f:debug>
<f:if condition="{user.image}">
<f:then>
<f:image image="{user.image.0}" width="100" alt="" />
</f:then>
<f:else>
</f:else>
</f:if>
</div>
user.image 的调试给出了这个
TYPO3\CMS\Extbase\Domain\Model\FileReferenceprototypepersistent entity (uid=34, pid=8)
uidLocal => protected 16 (integer)
originalResource => protected NULL
uid => protected 34 (integer)
_localizedUid => protected 34 (integer) modified
_languageUid => protected 0 (integer) modified
_versionedUid => protected 34 (integer) modified
pid => protected 8 (integer)
但是在前端我得到了这个错误
1476107295:PHP 可捕获的致命错误:TYPO3\CMS\Extbase\Persistence\ObjectStorage 类的对象无法转换为 字符串中
我尝试同时使用image=" 和src=",但没有任何效果。
这和服务器上没有安装GraphicsMagick有关系吗?
【问题讨论】:
标签: typo3-8.x fluid-styled-content