Bug #48216
closed![Author: Anonymous](/images/anonymous.png?1718153102)
Error in RteMagicImagesUpdateWizard.php
0%
Description
The Update of Magic Images did not work correctly for me when upgrading a local test site from 4.5.25 to 6.1.
The images were correctly moved from uploads/ to fileadmin/_migrated_/RTE, but the database was not updated.
I found two issues within /typo3/sysext/install/Classes/Updates/RteMagicImagesUpdateWizard.php - function findMagicImagesInOldLocation returns the old image locations from sys_refindex. The field name for the table is "tablename", yet the "performUpdate" function uses "table" as index in two locations. In addition, the fileadmin path was omitted when updating the specific tables. The following fixes worked for me:
Replace line 163 with:
$targetRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid, ' . $targetFieldName, $refRecord['tablename'], 'uid=' . intval($refRecord['recuid']));
Replace line 166 with:
$targetRecord[$targetFieldName] = str_replace($sourceFileName, $fileadminDirectory.$targetFileName, $targetRecord[$targetFieldName]);
Replace line 168 with:
$refRecord['tablename'],
Kind regrds,
Christian