WPML
Status
Resolved

Overview of the issue

Symptoms
When using WPML 4.8 together with a page builder (e.g., Elementor), attempting to open the Translation Editor may result in a PHP fatal error similar to:

PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given

in .../sitepress-multilingual-cms/classes/media-translation/AddMediaDataToTranslationPackage.php:82

This occurs when the page includes an image that lacks metadata (i.e., no title, caption, description, or alt text).

Workaround

Before opening the Translation Editor:

  • Edit the image in the WordPress Media Library.

  • Add at least one piece of metadata (for example, a title or alt text).

  • Save the image and then re-open the Translation Editor.

This prevents the fatal error and allows the translation page to load normally.


Status

  • A fix has been included in WPML 4.8.1, which will be released shortly.

  • Once updated, WPML will no longer crash when encountering images without metadata.

All known issues →