[TASK] Add patches for debugging imports

This commit is contained in:
Philipp Dieter 2022-04-22 14:02:55 +02:00
parent e08526325d
commit 6518020594
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,37 @@
*** webroot/typo3/sysext/core/Classes/DataHandling/DataHandler.php.orig 2022-04-22 13:15:26.314780488 +0200
--- webroot/typo3/sysext/core/Classes/DataHandling/DataHandler.php 2022-04-22 13:15:39.018129312 +0200
*************** class DataHandler implements LoggerAware
*** 7431,7446 ****
}
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($table);
$insertErrorMessage = '';
! try {
// Execute the INSERT query:
$connection->insert(
$table,
$fieldArray,
$typeArray
);
! } catch (DBALException $e) {
! $insertErrorMessage = $e->getPrevious()->getMessage();
! }
// If succees, do...:
if ($insertErrorMessage === '') {
// Set mapping for NEW... -> real uid:
--- 7431,7446 ----
}
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($table);
$insertErrorMessage = '';
! //try {
// Execute the INSERT query:
$connection->insert(
$table,
$fieldArray,
$typeArray
);
! //} catch (DBALException $e) {
! // $insertErrorMessage = $e->getPrevious()->getMessage();
! //}
// If succees, do...:
if ($insertErrorMessage === '') {
// Set mapping for NEW... -> real uid:

View File

@ -0,0 +1,12 @@
--- webroot/typo3/sysext/impexp/Classes/Import.php 2022-04-22 12:43:09.439221153 +0200
+++ webroot/typo3/sysext/impexp/Classes/Import.php 2022-04-22 12:43:27.169242298 +0200
@@ -446,7 +446,8 @@
}
if ($newFile->getSha1() !== $fileRecord['sha1']) {
- $this->error('Error: The hash of the written file is not identical to the import data! File could be corrupted! File: "' . $fileRecord['identifier'] . '" with storage uid "' . $fileRecord['storage'] . '"');
+ print('Error: The hash of the written file is not identical to the import data! File could be corrupted! File: "' . $fileRecord['identifier'] . '" with storage uid "' . $fileRecord['storage'] . '"');
+ print(PHP_EOL);
}
}