Actions
Bug #103708
closedMetaDataRepository->update() can't erase column content
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2024-04-23
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Right now it is not possible in v12.4 or v13.x to call the method to erase the content of a field.
This worked fine in v10 and 11.
Given: A record exists with a copyright value. A new update is executed with an empty value for copyright.
I would expect the copyright to be empty. Instead, it still has the old value.
That's our code:
$this->metaDataRepository->update($file->getUid(), [
'title' => $this->getShortenedString($mediaObject['value'], 100),
'description' => $mediaObject['description'] ?? '',
'alternative' => $mediaObject['description'] ?? '',
'creator_tool' => 'destination.one',
'source' => $mediaObject['url'] ?? '',
'copyright' => $mediaObject['source'] ?? '',
]);
The $updateRow = array_diff($updateRow, $metaDataFromDatabase);
removed the empty value.
Actions