Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing a 'White Screen of Death' and a critical error after adding Arabic as a new language to their website using WPML on the Woodmart theme. The error was identified as an E_COMPILE_ERROR in a WooCommerce wishlist email class, indicating a conflict due to the class 'Back_In_Stock_Email' being declared twice.
Solution:
We investigated the issue and found that the error was due to a translation string (%1$s – %2$s) being incorrectly translated into Arabic, which should have retained the same order as in the original language. We corrected the translation, and the site now functions correctly without the error. If you're experiencing similar issues, we recommend checking your translation strings for accuracy and ensuring they maintain the same variable order as the original.

Please note that this solution might be outdated or not applicable to your specific 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 the problem persists, please open a new support ticket.

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.

This topic contains 0 replies, has 1 voice.

Last updated by Dražen 3 weeks, 3 days ago.

Assisted by: Dražen.

Author Posts
March 20, 2025 at 9:54 am

Moe Haider

Background of the issue:
I am trying to add a new language (Arabic) to my website using WPML on the Woodmart theme by xtemos.com. The issue can be seen on this page: hidden link. Original language (English) can be seen with this screenshot: hidden link. The other language's (Arabic) screenshot: hidden link. The website's visibility is set to 'OFF LINE' by Woocommerce, but it can be viewed through this link: hidden link.

Symptoms:
The new language was working fine for a few minutes, then a 'White Screen of Death', Critical Error, started showing instead of the new language. An error of type E_COMPILE_ERROR was caused in line 15 of the file /home/gyetakxo/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/wishlist/emails/class-back-in-stock-email.php. Error message: Cannot declare class Back_In_Stock_Email, because the name is already in use.

Questions:
Why is the new language causing a 'White Screen of Death'?
What does the E_COMPILE_ERROR mean and how can I fix it?
Why is the class Back_In_Stock_Email causing a conflict?

March 20, 2025 at 11:36 am
March 21, 2025 at 7:25 am #16842827

Moe Haider

Hello

I've just cloned ya the site on the directory below:
hidden link

All information in the chat, including support user are included.
As such, the login page is now hidden link, and the test page is hidden link

On my main site installation, in the root, I'll be reinstalling WPML and this time translate manually to avoid the issues caused by WPML Auto translation service. Hope this would solved the issue.

Awaiting to hear from ya, kindly, on following up with the issue on the cloned installation

March 24, 2025 at 7:26 am #16849858

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for your patience. I checked further and the issue was with the next string (%1$s – %2$s) being wrongly translated in AR, it should have the same order.

I have adjusted it and it works fine now.

Regards,
Drazen

String Translation ‹ WPML-Stagging WiQ8 — WordPress.jpg