Questo thread è stato risolto. Ecco una descrizione del problema e della soluzione.
Problem:
After updating to WPML 4.9.0, several wp-admin pages cause PHP timeouts (504) or memory exhaustion. The issue is linked to the DebugBackTrace class being instantiated without a limit in multiple places, causing excessive memory usage. Additionally, a recursive loop triggered by _load_textdomain_just_in_time causes incorrect loading of WooCommerce translations when backtrace is disabled.
Solution:
Note that these known issues were solved in WPML 4.9.1 and 4.9.2.
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 issues persist, please open a new support ticket at WPML support forum for further assistance.
Questo è il forum di assistenza tecnica di WPML, il plug-in multilingue di WordPress.
La sua lettura è permessa a tutti, ma la pubblicazione è riservata esclusivamente ai clienti di WPML. Il team di WPML risponde sul forum 6 giorni su 7, 22 ore su 24.
Etichettato: Exception
Questo ticket contiene 13 risposte, ha 0 voci.
Ultimo aggiornamento da benedettoT-3 1 mese fa.
Assistito da: Andreas W..
| Autore | Post |
|---|---|
| Febbraio 20, 2026 alle 16:24 #17839022 | |
|
benedettoT-3 |
Starting from WPML 4.9.0, several wp-admin pages cause PHP timeout (504) or memory exhaustion. Frontend works correctly. classes/utilities/class-debug-backtrace.php — DebugBackTrace is instantiated without a limit (new \WPML\Utils\DebugBackTrace()) in two places: addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-translate-ids-factory.php line 6 When backtrace is disabled, PHP exhausts 1GB RAM due to a recursive loop triggered by _load_textdomain_just_in_time called too early by WPML, causing WooCommerce translations to load incorrectly. Environment: PHP 8.1.34, WordPress 6.9.1, WooCommerce active, Elementor active, 1GB memory limit. |
| Febbraio 22, 2026 alle 2:12 #17840537 | |
|
Andreas W. Sostenitore di WPML dal 12/2018
Lingue: Inglese (English ) Spagnolo (Español ) Tedesco (Deutsch ) Fuso orario: America/Lima (GMT-05:00) |
Hello, Thank you very much for reporting this issue! Take kindly note that to investigate this issue, we need access to your site, as this issue can be very site-specific. It would be ideal if you could provide access to a staging site. If you do not have a staging site available or can not provide one, I can offer to take a local copy of your site if you provide me with admin access. I would enable a private reply form in this case. About the error: The DebugBackTrace class provides a 'forensic map' of function calls to help WPML understand the current code context. In complex Elementor pages with many widgets, WPML is forced to generate hundreds of these massive 'maps'—often containing the same 150+ lines of history—faster than the server can clear the memory. This leads to the memory exhaustion you are seeing. Diagnostic workaround: File to Edit: wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/WPML_Elementor_Translate_IDs.php Task: Modify the should_translate_template method to capture the stack only once per check. Replace the existing function with this code:
private function should_translate_template() {
// 1. Manually update the backtrace exactly once for this check
$this->debug_backtrace->get_backtrace();
// 2. Perform all checks without refreshing the stack again (passing false)
return $this->debug_backtrace->is_class_function_in_call_stack( 'ElementorPro\Modules\Library\WP_Widgets\Elementor_Library', 'widget', false )
|| $this->debug_backtrace->is_class_function_in_call_stack( 'ElementorPro\Modules\Library\Classes\Shortcode', 'shortcode', false )
|| $this->debug_backtrace->is_class_function_in_call_stack( 'ElementorPro\Modules\Library\Widgets\Template', 'render', false )
|| $this->debug_backtrace->is_class_function_in_call_stack( 'ElementorPro\Modules\Forms\Classes\Ajax_Handler', 'ajax_send_form', false );
}
It only affects how WPML handles Elementor IDs. If applying this workaround will solve the memory exhaustion issue, please let me know. Final test: Site access: I will be glad to test this for you on a staging site or a local copy of your site and request temporary access (wp-admin and FTP) to the website to investigate the issue further. You'll find the necessary fields below the comment section if you log in to leave the next reply. The information you provide will be private, meaning only you and I can see and access it. IMPORTANT If you don't see the "wp-admin / FTP" fields, your login credentials for the post and website will be set to "PUBLIC." Do NOT publish the information unless you see the required wp-admin / FTP fields. The private reply form looks like this: When replying again, click "I still need assistance". Video: Please note that we are required to request this information individually on each ticket. We are not permitted to access any login information that was not specifically provided in the private reply form for this ticket. Best regards |
| Marzo 3, 2026 alle 14:55 #17869054 | |
|
benedettoT-3 |
Hi, |
| Marzo 4, 2026 alle 5:41 #17870528 | |
|
Andreas W. Sostenitore di WPML dal 12/2018
Lingue: Inglese (English ) Spagnolo (Español ) Tedesco (Deutsch ) Fuso orario: America/Lima (GMT-05:00) |
I am glad to hear that the issue appears to be solved! The latest update WPML 4.9.2 fixed an issue with missing custom fields in translations and an issue where Full Site Editing templates were not applied to translated pages. In your case the issue seems to have been related to Elementor and the prior WPML 4.9.1 update had various fixes for Elementor: https://wpml.org/it/download/wpml-multilingual-cms/?section=changelog |
| Marzo 4, 2026 alle 13:16 #17872043 | |
|
benedettoT-3 |
I looked at the changelog for version 4.9.1, but I don't see anything that addresses the problem I was having. |
| Marzo 4, 2026 alle 18:42 #17872819 | |
|
Andreas W. Sostenitore di WPML dal 12/2018
Lingue: Inglese (English ) Spagnolo (Español ) Tedesco (Deutsch ) Fuso orario: America/Lima (GMT-05:00) |
Indeed, but this function that is mentioned in your error could be connected to one of the fixed issues in the last two updates for WPML. In case the issue occurs again, just reach out to us and we will be glad to look into this. |
| Marzo 6, 2026 alle 16:11 #17878210 | |
|
benedettoT-3 |
After checking further, I noticed that the problem is still partially present. Basically, when I generate an invoice from WooCommerce (using the WooCommerce Italian Add-on Plus and PDF Invoices & Packing Slips for WooCommerce plugins), |
| Marzo 6, 2026 alle 17:15 #17878255 | |
|
Andreas W. Sostenitore di WPML dal 12/2018
Lingue: Inglese (English ) Spagnolo (Español ) Tedesco (Deutsch ) Fuso orario: America/Lima (GMT-05:00) |
Hello, I'd like to request temporary access (wp-admin and FTP) to the website to investigate the issue further. You'll find the necessary fields below the comment section if you log in to leave the next reply. The information you provide will be private, meaning only you and I will be able to see and access it. IMPORTANT If you don't see the "wp-admin / FTP" fields, your login credentials for the post and website will be set to "PUBLIC." Do NOT publish the information unless you see the required wp-admin / FTP fields. I may need to install a plugin called "All In One WP Migration" to create a copy of the website on which I can investigate the problem more thoroughly. I would also be very grateful if you could provide a staging site on your server for this purpose. If you have any questions about creating such a staging site, please contact your hosting provider. Please ensure that WPML is also registered on this staging site at https://wpml.org/de/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: When replying again, click "I still need assistance". Video: Please note that we are required to request this information individually on each ticket. We are not permitted to access any login information that was not specifically provided in the private reply form for this ticket. Best regards |
| Marzo 12, 2026 alle 23:35 #17894095 | |
|
Andreas W. Sostenitore di WPML dal 12/2018
Lingue: Inglese (English ) Spagnolo (Español ) Tedesco (Deutsch ) Fuso orario: America/Lima (GMT-05:00) |
I can sadly not reach the site: I would need FTP/SFTP access to investigate this further. Please also check with your hosting support regarding any server issues that occur. The private reply form is enabled again. |
| Marzo 14, 2026 alle 10:02 #17897238 | |
|
Andreas W. Sostenitore di WPML dal 12/2018
Lingue: Inglese (English ) Spagnolo (Español ) Tedesco (Deutsch ) Fuso orario: America/Lima (GMT-05:00) |
The staging lost its database connections. It looks like someone recently edited the wp-config.php file. Please verify and let me know once the site is running again. |
| Marzo 16, 2026 alle 13:25 #17900509 | |
|
benedettoT-3 |
can you try now? |
| Marzo 17, 2026 alle 15:56 #17905501 | |
|
Andreas W. Sostenitore di WPML dal 12/2018
Lingue: Inglese (English ) Spagnolo (Español ) Tedesco (Deutsch ) Fuso orario: America/Lima (GMT-05:00) |
On this staging site, WordPress was not updated, and there were 22 plugin updates available. This seems to have solved the issue. Please, before reporting an issue, always make sure that all components are updated. |
| Marzo 18, 2026 alle 14:07 #17908416 | |
|
benedettoT-3 |
you see the wrong site |
| Marzo 18, 2026 alle 23:41 #17909551 | |
|
Andreas W. Sostenitore di WPML dal 12/2018
Lingue: Inglese (English ) Spagnolo (Español ) Tedesco (Deutsch ) Fuso orario: America/Lima (GMT-05:00) |
My apologies for the misunderstanding, but I did not see the wrong website. I said: What I am trying to say here is that I ran the updates already, and the issue does not occur anymore. Am I misunderstanding the issue? 1) Go to WooCommerce > Ordini This works without any 504 error on the staging now. The only thing unexpected is how the preview of this email is rendered, but this is not related to WPML. |
| Marzo 20, 2026 alle 13:51 #17914382 | |
|
benedettoT-3 |
It actually works now. In my tests, I had to disable WPML to get that page to work. However, I've now also tried it in Prod, and it actually works. Could there have been a conflict with another plugin they updated? |