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

History 27

  1. Gerrit Code Review pushed patch set 1 for main to change 80973 status New Under Review 09/12/23, 04:56

  2. Gerrit Code Review pushed patch set 2 for main to change 80973 09/18/23, 12:21

  3. Gerrit Code Review pushed patch set 3 for main to change 80973 09/18/23, 12:26

  4. Gerrit Code Review pushed patch set 1 for 12.4 to change 81056 09/18/23, 13:18

  5. Gerrit Code Review pushed patch set 1 for 11.5 to change 81057 09/18/23, 13:18

  6. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % 09/18/23, 13:20

    Applied in changeset commit:5893f2cb74a0164dbb3b3bb2daf93a9b4d58a800.

  7. Benni Mack changed status Resolved Closed 07/09/24, 15:19