Bug #59185
closedDataHandler->log() has no return value when logging is disabled
100%
Description
I had a bug in 6.1.9 with dd_googlesitemap and after debugging I'm pretty sure that there is some sort of flaw in the core.
dd_googlesitemap disables logging with:
$tce->enableLogging = FALSE;
Following that DataHandler->log() will not return anything.
Therefor $theLogId in DataHandler->updateDB() is empty.
And DataHandler->setHistory() fails because sys_log_uid can't be NULL.
Related error message from T3:
caller: TYPO3\CMS\Core\Database\DatabaseConnection::exec_INSERTquery ERROR: Column 'sys_log_uid' cannot be null lastBuiltQuery: INSERT INTO sys_history (history_data,fieldlist,tstamp,tablename,recuid,sys_log_uid) VALUES ('a:2:{s:9:\"oldRecord\";a:1:{s:26:\"tx_ddgooglesitemap_lastmod\";s:54:\"1399301453,1399301684,1399301697,1399449582,1399451432\";}s:9:\"newRecord\";a:1:{s:26:\"tx_ddgooglesitemap_lastmod\";s:54:\"1399301684,1399301697,1399449582,1399451432,1399451867\";}}','tx_ddgooglesitemap_lastmod','1399451865','pages','160',NULL) debug_backtrace: TYPO3\CMS\Backend\Controller\EditDocumentController->processData#54 // TYPO3\CMS\Core\DataHandling\DataHandler->process_datamap#470 // TYPO3\CMS\Core\DataHandling\DataHandler->hook_processDatamap_afterDatabaseOperations#1068 // tx_ddgooglesitemap_tcemain->processDatamap_afterDatabaseOperations#681 // tx_ddgooglesitemap_tcemain->recordPageChange#64 // TYPO3\CMS\Core\DataHandling\DataHandler->process_datamap#105 // TYPO3\CMS\Core\DataHandling\DataHandler->updateDB#1061 // TYPO3\CMS\Core\DataHandling\DataHandler->setHistory#5616 // TYPO3\CMS\Core\Database\DatabaseConnection->exec_INSERTquery#5752 // TYPO3\CMS\Core\Database\DatabaseConnection->debug#198
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30479
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30479
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30549
Updated by Markus Klein over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cd81ccb50a293f521b5a5a3040ebcc1c3ff6e607.