0

The following situation:

  • Automated importing of items:
    • Images for items are updated by some cron task perl into folder uploads/myExt/<Vendor>/<Serial>/ (Vendor and Serial may differ between products)
    • Images have naming conventions and every product has its own folder
    • A Command script is started on the command line which get's product data by an XML file; data is stored in database (Extbase tx_myext_domain_model_item)
  • Frontend Rendering
    • Extbase controller scans the the item's image folder 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
    • Fluid template loops over the imagesInFolder: <f:for each="{imagesInFolder}" as="image">
    • For every image render a thumbnail of the image with the help of Fluid's image view helper: <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. 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.

How can I tell TYPO3 to re-render processed files when original file is newer?

Maybe there is some TypoScript setting for Fluid that does this which I didn't find.
Maybe there is some Service which I could call during import?

yunzen
  • 32,854
  • 11
  • 73
  • 106

1 Answers1

1

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.

be aware there is another similar task: "File Abstraction Layer: Extract metadata in storage", which might need to be called after the other.

Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38
  • Thank's I'll have a look – yunzen May 07 '19 at 11:21
  • Do you happen to know, if I can call this update manually for individual files? – yunzen May 07 '19 at 11:22
  • This does seem to work. I only didn't give the correct storage to update – yunzen May 07 '19 at 12:03
  • there is no possibility to call it for individual files. But you might store your files in a very special file storage, so the scheduler task can find changes faster. Don't cascade file storages inside each other!! – Bernd Wilke πφ May 07 '19 at 12:38
  • Do you happen to know, what are the margins of that task? I have tried to run this on approx. 14000 images and it runs for more than half a day. Is this reasonable or must there be some flaws on my side (configuratio, etc)? – yunzen May 09 '19 at 07:34
  • I have no exact figures, I could imagine multi reasons it takes very long up to: it terminates with (memory?)error. You probably can tell only if you know the code and what is done to detect changes. maybe a question for core experts. – Bernd Wilke πφ May 09 '19 at 09:04