Project

General

Profile

Actions

Bug #101924

closed

Try/catch cleanup:missingrelations to avoid crashes when setReferenceValue fails

Added by Benjamin Serfhos 8 months ago. Updated 7 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
Start date:
2023-09-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

While running cleanup:missingrelations the datahandler crashes on retrieving a file and stops the further cleanup.
With a 'simple' try/catch the process should at least continue.

Removing reference in record "sys_file_metadata:95:file" (Hash: 031a1cfca7cf323b83930f4fe96645ae)

  [ TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException ]  
  No file found for given UID: 94                                  

Exception code: 1317178604

Exception trace:
#0 ()
   vendor/typo3/cms-core/Classes/Resource/ResourceFactory.php:210
#1 TYPO3\CMS\Core\Resource\ResourceFactory->getFileObject()
   vendor/typo3/cms-core/Classes/Resource/Security/FileMetadataPermissionsAspect.php:164
#2 TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect->checkFileWriteAccessForFileMetaData()
   vendor/typo3/cms-core/Classes/Resource/Security/FileMetadataPermissionsAspect.php:101
#3 TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect->checkModifyAccessList()
   vendor/typo3/cms-core/Classes/DataHandling/DataHandler.php:7113
#4 TYPO3\CMS\Core\DataHandling\DataHandler->checkModifyAccessList()
   vendor/typo3/cms-core/Classes/DataHandling/DataHandler.php:861
#5 TYPO3\CMS\Core\DataHandling\DataHandler->process_datamap()
   vendor/typo3/cms-core/Classes/Database/ReferenceIndex.php:740
#6 TYPO3\CMS\Core\Database\ReferenceIndex->setReferenceValue()
   vendor/typo3/cms-lowlevel/Classes/Command/MissingRelationsCommand.php:360
#7 TYPO3\CMS\Lowlevel\Command\MissingRelationsCommand->removeReferencesToMissingRecords()
   vendor/typo3/cms-lowlevel/Classes/Command/MissingRelationsCommand.php:170
#8 TYPO3\CMS\Lowlevel\Command\MissingRelationsCommand->execute()
   vendor/symfony/console/Command/Command.php:326
#9 Symfony\Component\Console\Command\Command->run()
   vendor/symfony/console/Application.php:1081
#10 Symfony\Component\Console\Application->doRunCommand()
   vendor/symfony/console/Application.php:320
#11 Symfony\Component\Console\Application->doRun()
   vendor/symfony/console/Application.php:174
#12 Symfony\Component\Console\Application->run()
   vendor/typo3/cms-core/Classes/Console/CommandApplication.php:112
#13 TYPO3\CMS\Core\Console\CommandApplication->run()
   vendor/typo3/cms-cli/typo3:23
#14 {closure}()
   vendor/typo3/cms-cli/typo3:24
#15 include()
   vendor/bin/typo3:120

cleanup:missingrelations [--dry-run] [--update-refindex]

Actions #1

Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81024

Actions #2

Updated by Gerrit Code Review 8 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81024

Actions #3

Updated by Gerrit Code Review 8 months ago

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81026

Actions #4

Updated by Gerrit Code Review 8 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81026

Actions #5

Updated by Gerrit Code Review 8 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81026

Actions #6

Updated by Gerrit Code Review 8 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81026

Actions #7

Updated by Gerrit Code Review 8 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81026

Actions #8

Updated by Gerrit Code Review 8 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81026

Actions #9

Updated by Gerrit Code Review 7 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81024

Actions #10

Updated by Gerrit Code Review 7 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81024

Actions #11

Updated by Gerrit Code Review 7 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81024

Actions #12

Updated by Gerrit Code Review 7 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81024

Actions #13

Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81139

Actions #14

Updated by Benjamin Serfhos 7 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF