Issue Bug Closed

#101730Missing last_indexed entry on initial file upload

Jan Amedick 08/22/23, 12:43 updated 07/09/24, 15:19

Description

The createIndexEntry function in TYPO3\CMS\Core\Resource\Index\Indexer does not update the last_indexed column in the sys_file table after processing an uploaded file. This leads to a loss of edited metadata while the index is updated (e.g. executed by the scheduler task /typo3/sysext/scheduler/Classes/Task/FileStorageIndexingTask.php), since the file is considered as unindexed. The result is: The original metadata is extracted from the file again and used to overwrite the edited metadata.

Adding

$this->getFileIndexRepository()->updateIndexingTime($fileObject->getUid());

after Line 90 in the Indexer.php

$fileObject->getMetaData()->add($metaData)->save();

fixes the issue.

Reviews 3