[英]Fluid's image viewhelper shows outdated images
The following situation: 以下情况:
uploads/myExt/<Vendor>/<Serial>/
(Vendor and Serial may differ between products) 项目的图像由某些cron任务perl更新为文件夹uploads/myExt/<Vendor>/<Serial>/
(产品之间的供应商和序列号可能有所不同) tx_myext_domain_model_item
) 数据存储在数据库中(Extbase tx_myext_domain_model_item
) uploads/myExt/<Vendor>/<Serial>/
and sends an array of filenames (name: imagesInFolder
) in that folder along with the name of the folder (name: imageFolder
) to the template Extbase控制器扫描项目的图像文件夹uploads/myExt/<Vendor>/<Serial>/
并将该文件夹中的文件名数组(名称: imagesInFolder
)以及文件夹名称(名称: imageFolder
)发送到模板 imagesInFolder
: <f:for each="{imagesInFolder}" as="image">
流体模板在imagesInFolder
循环: <f:for each="{imagesInFolder}" as="image">
image
view helper: <f:image src="{item.imageFolder -> f:format.raw()}/{image}" maxWidth="193" maxHeight="145" />
对于每个图像,请使用Fluid的image
视图帮助器渲染图像的缩略图: <f:image src="{item.imageFolder -> f:format.raw()}/{image}" maxWidth="193" maxHeight="145" />
Here's the issue: 这是问题所在:
When the order of the files is changed, only the filenames are changed. 更改文件顺序时,仅更改文件名。 but in the frontend the order remains the same as before, which is wrong. 但在前端的顺序与以前相同,这是错误的。 The processed thumbnails in the _processed_
folder are not updated. _processed_
文件夹中的已处理缩略图不会更新。 I have tried to change the mtime and ctime of the files to be newer than that of the processed files, but nothing has changed. 我试图将文件的mtime和ctime更改为比已处理文件的更新,但没有任何更改。
How can I tell TYPO3 to re-render processed files when original file is newer? 当原始文件较新时,如何告诉TYPO3重新渲染处理过的文件?
Maybe there is some TypoScript setting for Fluid that does this which I didn't find. 也许我没有找到一些Fluid的TypoScript设置来做到这一点。
Maybe there is some Service which I could call during import? 也许有一些我可以在导入期间致电的服务?
There is a scheduler task named "File Abstraction Layer: Update storage index" which scans a file storage for new or changed files. 有一个名为“文件抽象层:更新存储索引”的调度程序任务,该任务扫描文件存储中的新文件或更改的文件。
Make sure the task starts often enough. 确保任务启动足够频繁。
In general: try to avoid replacing or renaming files as TYPO3 generates dependent files and records, which all need refreshing. 通常:尝试避免替换或重命名文件,因为TYPO3会生成依赖文件和记录,这些文件和记录都需要刷新。
be aware there is another similar task: "File Abstraction Layer: Extract metadata in storage" , which might need to be called after the other. 请注意,还有另一个类似的任务: “文件抽象层:提取存储中的元数据” ,可能需要在另一个之后调用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.