Background of the issue:
I installed WPML with WooCommerce, ACF, Mailchimp, and String Translation Addons via the OTGS installer. After the initial setup, except for WooCommerce, I wanted to translate 4 pages of the normal WordPress site. This process fails instantly with an internal server error. My Apache gives the following log entries regarding this matter: <code>500 GET /cms/wp-admin/admin.php?page=tm%2Fmenu%2Ftranslations-queue.php&return_url=https%3A%2F%2Fweingut-hoellmueller.at%2Fcms%2Fwp-admin%2Fedit.php%3Fpost_type%3Dpage%26lang%3Dde%26referer%3Date%26wpml_version%3D4.8.0&lang=de&trid=218&language_code=en&source_language_code=de HTTP/1.0</code> <code>AH01071: Got error 'PHP message: PHP Warning: Undefined array key 404 in /var/www/vhosts/weingut-hoellmueller.at/httpdocs/data/plugins/sitepress-multilingual-cms/classes/media-translation/AddMediaDataToTranslationPackage.php on line 83; PHP message: PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /var/www/vhosts/weingut-hoellmueller.at/httpdocs/data/plugins/sitepress-multilingual-cms/classes/media-translation/AddMediaDataToTranslationPackage.php:82nStack trace:n#0 /var/www/vhosts/weingut-hoellmueller.at/httpdocs/data/plugins/sitepress-multilingual-cms/classes/media-translation/AddMediaDataToTranslationPackage.php(82): array_merge()n#1 /var/www/vhosts/weingut-hoellmueller.at/httpdocs/data/plugins/sitepress-multilingual-cms/classes/media-translation/AddMediaDataToTranslationPackage.php(26): WPML\MediaTranslation\AddMediaDataToTranslationPackage->get_bundled_media_to_translate()n#2 /var/www/vhosts/weingut-hoellmueller.at/httpdocs/cms/wp-includes/class-wp-hook.php(326): WPML\MediaTranslation\AddMediaDataToTranslationPackage->add_media_strings()n#3 /var/www/vhosts/weingut-hoellmueller.at/httpdocs/cms/wp-includes/plugin.php(205): WP_Hook->apply_filters()n#4 /var/www/vhosts/weingut-hoellmuel...', referer: hidden link;. Link to a page where the issue can be seen: hidden link.
Symptoms:
I expected to reach the normal translation editor where I can start the (automatic) translation. Instead, I got the standard 'Your site has a critical error' message, which pops up in WordPress on internal server errors (500 codes).
Questions:
Why am I receiving an internal server error when trying to translate pages?
How can I resolve the PHP warning and fatal error related to the WPML plugin?