mhirdes / go_maps_ext

Google Maps Extension for TYPO3
MIT License
21 stars 31 forks source link

Lost address images with TYPO3 12 (migration needed) #120

Closed saitho closed 1 month ago

saitho commented 7 months ago

There is an issue with address images of this extension running with TYPO3 12.

'info_window_images' => [
    'exclude' => 1,
    'label' => 'LLL:EXT:go_maps_ext/Resources/Private/Language/locallang_db.xlf:tx_gomapsext_domain_model_address.info_window_images',
    'description' => 'LLL:EXT:go_maps_ext/Resources/Private/Language/locallang_csh_tx_gomapsext_domain_model_address.xlf:info_window_images.description',
    'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
        'tx_gomapsext_info_window_image'
        // ...
    ),
],

Previously (up to TYPO3 11) the relations were created with fieldname=tx_gomapsext_info_window_image, which is the field name defined via ExtensionManagementUtility::getFileFieldTCAConfig(), i.e. tx_gomapsext_info_window_image.

With TYPO3 12 ExtensionManagementUtility::getFileFieldTCAConfig() is deprecated in favour of the new TCA type file. Even though being a deprecation, there is a changed behaviour when the field names do not match. Now, relations are always using the field name "info_window_images".

So, when upgrading to TYPO3 12, an additional migration is needed to change the fieldname from tx_gomapsext_info_window_image to info_window_images.

mhirdes commented 2 months ago

Good point. May we can provide a short migration script. If you have one you can also create a PR.

mhirdes commented 1 month ago

in v7 we added an upgrade wizard