This thread is resolved. Here is a description of the problem and solution.
Problem:
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).
Solution:
We published an errata for this issue. The issue was fixed in WPML 4.8.1, which can be downloaded at Plugins > Add new on the "Commercial" tab or from https://wpml.org/account/downloads/.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Known issue
This topic contains 11 replies, has 2 voices.
Last updated by Andreas W. 1 month ago.
Assisted by: Andreas W..
| Author | Posts |
|---|---|
| August 27, 2025 at 7:44 pm #17352895 | |
|
mulhamZ-2 |
Background of the issue: Symptoms: Questions: |
| August 28, 2025 at 7:45 am #17353591 | |
|
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, Thanks for contacting us. While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly. To allow us to see if any PHP errors are being produced, please provide the WordPress debug.log. More Info: https://wordpress.org/support/article/debugging-in-wordpress/ To enable debug.log, open your wp-config.php file and look for: define('WP_DEBUG', false);
And change it to:
define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
Then try to reproduce the issue and check if any errors were saved to the debug.log log file inside the “.../wp-content/” directory. Regards, |
| August 28, 2025 at 7:49 am #17353651 | |
|
mulhamZ-2 |
An error of type E_ERROR was caused in line 82 of the file /home/goldmast/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/media-translation/AddMediaDataToTranslationPackage.php. Error message: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /home/goldmast/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/media-translation/AddMediaDataToTranslationPackage.php:82 |
| August 29, 2025 at 1:53 am #17356566 | |
|
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Note that the REST API is not available in language directories like /en in second languages. You can only access it at: To access the English data, use a language parameter: About the error: 1) It seems the minimum requirements on the server are not met: Could you please increase the WordPress memory limit (WP Memory Limit) to at least 256 MB? WPML requires at least 128 MB. PHP Memory Limit 512 MB To do this, you need to connect to your website's server and open the wp-config.php file in a text editor. The file is located in the WordPress root directory. Add this code to the wp-config.php file to increase WordPress memory:
define ('WP_MEMORY_LIMIT', '256M');
Add this just before this comment: // That's all, stop editing! Happy blogging. The current values can be viewed under WPML > Support > WordPress. These settings can be restricted directly by your hosting provider. Therefore, I recommend contacting them and asking them to change them directly if the changes are not applied immediately. 2) Now, please edit the original post or page, save it again and complete the translation again. Do you still get the same error? If so, does the error disappear if you disable "EWWW Image Optimizer" and test again? Also, please make sure ot run WPML > Settings > Media Translation > Start. This dialog will sync the media into all languages inside the media library. Then test again. If these adjustments will not solve the issue, please let me know. Best regards |
| August 29, 2025 at 8:48 am #17357155 | |
|
mulhamZ-2 |
Dear Andreas, Thank you for your reply and suggestions. Here is what I have done so far: I increased the WordPress memory limit to 256 MB as advised. I edited and saved the original page, then tried saving the translated page again, but the same critical error occurred. I deactivated the EWWW Image Optimizer plugin and also ran the Media Translation > Start synchronization process, but unfortunately the issue still persists. The problem remains the same: translated pages trigger the critical error upon saving, while standalone pages work without issues. Please advise on the next steps. Best regards, |
| August 29, 2025 at 5:51 pm #17358619 | |
|
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the website to investigate the issue further. The required fields are located below the comments section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it. IMPORTANT I may need to install a plugin called "All In One WP Migration" to create a copy of the website so I can investigate the issue further. However, I would also be very grateful if you could provide a staging site or a copy of the website from your server for this purpose. If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/account/websites/. If you are unable to provide such a copy of the website for testing, please let me know on this ticket. The private reply form looks like this: Click "I still need assistance" the next time you reply. Video: Please note that we are required to request this information individually on each ticket. We are not permitted to access any credentials that were not specifically submitted on this ticket using the private response form. Best regards, |
| August 30, 2025 at 1:02 pm #17359332 | |
|
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I took a visit to your site and made some random tests, but could not see the error. Can you please name an example (title or permalink) where I can see the issue? |
| August 30, 2025 at 1:18 pm #17359477 | |
|
mulhamZ-2 |
You can visit "About us" English page and press on "update" to see the error |
| August 30, 2025 at 4:05 pm #17359714 | |
|
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
It looks like this error occurs if the option WPML > Settings > Media Translation > Automatically detect best options for translating image texts (alt, caption, title) is enabled while the content is actually getting translated with the WordPress Editor. Usually, you would duplicate or copy from the original content and then edit the translation when using the "WordPress Editor" as a translation method. I suppose you would not need to enable the above-mentioned option in this case. I have disabled the option now. Please proceed with your translation and let me know if you spot any issues. Note that this issue has been escalated to our development team. |
| August 30, 2025 at 4:10 pm #17359715 | |
|
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
This issue will be solved in WPML 4.8.1: |
| August 30, 2025 at 4:18 pm #17359717 | |
|
mulhamZ-2 |
Thank you Andreas. |
| October 1, 2025 at 6:22 pm #17450065 | |
|
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I am glad to inform you that the reported issue was fixed in WPML 4.8.1, which can be downloaded at Plugins > Add new on the "Commercial" tab or at: Best regards |




