Issue Bug Closed

#86751Pressing "Mark undone" of "Migrate all file relations from fe_users.image to sys_file_references" has no effect

Alexander Grein 10/26/18, 11:41 updated 05/07/19, 12:15

Description

Because of a logical bug inside the “updateNecessary” method, the wizard doesn’t come up after pressing the “Mark undone” button inside the upgrate wizard.

The problem is the init() call, which sets the property recordOffset to [] if there is no registry key recordOffset found.
This is alway the case, until there was an unfinised run before.

Anyway, to fix this problem the updateNecessary method should be changed to:

public function updateNecessary(): bool
    {
        $this->registry = GeneralUtility::makeInstance(Registry::class);
        return $this->registry->get($this->registryNamespace, 'recordOffset') === null;
    }

Additionaly the migration will fail, because of a not more existing “sorting” field inside the sys_file_references table.

To fix this, only this line (311) must be removed:

'sorting' => $i + 256,

A patch for both problems is attached.

Reviews 1