Bug #89020

Unknown column 'newlyCreated' in 'field list'

Added by This Mächler 4 months ago. Updated 4 months ago.

Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
newlyCreated sys_file_metadata workspace
Is Regression:
Sprint Focus:



Edit a record in draft workspace (record with IRRE elements insinde, don't know if this matters).
After saving and reloading the frontend, I get this error in the FE:

An exception occurred while executing 'SELECT `file`, `pid`, `crdate`, `tstamp`, `cruser_id`, `l10n_diffsource`, `uid`, `newlyCreated` FROM `sys_file_metadata` WHERE (`pid` = ?) AND (`t3ver_oid` = ?) AND (`t3ver_wsid` = ?) LIMIT 1' with params [-1, 5721, 1]: Unknown column 'newlyCreated' in 'field list'

Doctrine\DBAL\Exception\InvalidFieldNameException thrown in file
/home/clients/d093324e36a4e035ed2439efe5bbc89e/dev/typo3_src-8.7.27/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php in line 71.

Stack trace:

50 TYPO3\CMS\Extbase\Service\ImageService::getImage("uploads/tx_dfimageblog/wbw_7-8-2016_02.jpg", NULL, boolean)
51 TYPO3\CMS\Extbase\Service\ImageService::getImageFromSourceString("uploads/tx_dfimageblog/wbw_7-8-2016_02.jpg", boolean)
52 TYPO3\CMS\Core\Resource\ResourceFactory::retrieveFileOrFolderObject("uploads/tx_dfimageblog/wbw_7-8-2016_02.jpg")
53 TYPO3\CMS\Core\Resource\ResourceFactory::getFileObjectFromCombinedIdentifier("uploads/tx_dfimageblog/wbw_7-8-2016_02.jpg")
TYPO3\CMS\Core\Resource\ResourceFactory::getFileObjectByStorageAndIdentifier(0, "uploads/tx_dfimageblog/wbw_7-8-2016_02.jpg")
55 TYPO3\CMS\Core\Resource\Index\Indexer::createIndexEntry("uploads/tx_dfimageblog/wbw_7-8-2016_02.jpg")
60 TYPO3\CMS\Extbase\SignalSlot\Dispatcher::dispatch("TYPO3\CMS\Core\Resource\Index\MetaDataRepository", "recordPostRetrieval", array)
61 call_user_func_array(array, array)
62 TYPO3\CMS\Frontend\Aspect\FileMetadataOverlayAspect::languageAndWorkspaceOverlay(ArrayObject, "TYPO3\CMS\Core\Resource\Index\MetaDataRepository::recordPostRetrieval")
63 TYPO3\CMS\Frontend\Page\PageRepository::versionOL("sys_file_metadata", array)
64 TYPO3\CMS\Frontend\Page\PageRepository::getWorkspaceVersionOfRecord(1, "sys_file_metadata", 5721, "file,pid,crdate,tstamp,cruser_id,l10n_diffsource,uid,newlyCreated", boolean)
65 TYPO3\CMS\Core\Database\Query\QueryBuilder::execute()
66 Doctrine\DBAL\Query\QueryBuilder::execute()
67 Doctrine\DBAL\Connection::executeQuery("SELECT `file`, `pid`, `crdate`, `tstamp`, `cruser_…D (`t3ver_oid` = ?) AND (`t3ver_wsid` = ?) LIMIT 1", array, array)

When I move to other Modules in the Backend, or clear the cache (needs two actions sometimes), the error disapears.

Should the table 'sys_file_metadata' have a field 'newlyCreated'? I ran the Database analyzer, everything seems to be OK. What can I do?


#1 Updated by This Mächler 4 months ago

When I move to other Modules in the Backend, or clear the cache (needs two actions sometimes), the error disapears.

Update: the error disapears after certain (2 or 3) reloads of the frontend. Without clearing any cache.

#2 Updated by This Mächler 4 months ago

The bug only appears after creating new workspace versions. Editing and saving existing workspace versions don't produce the bug in the frontend.

#3 Updated by This Mächler 4 months ago

The bug also does not appear if I directly edit the inline record (that refers the images). Only if I edit the record that contains the inline record.

#4 Updated by This Mächler 4 months ago

In the source code I can find two appearances of 'newlyCreated'

In 'typo3/sysext/core/Classes/Resource/Index/MetaDataRepository.php', line 64:

if (!empty($record['newlyCreated'])) {
  if ($file->getType() === File::FILETYPE_IMAGE && $file->getStorage()->getDriverType() === 'Local'){

In 'typo3/sysext/core/Tests/Unit/Resource/MetaDataAspectTest.php', line 175:

  'uid' => '5',
  'newlyCreated' => true,

Also available in: Atom PDF