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 thread is resolved. Here is a description of the problem and solution.

Problem: The user was having a Fatal error when activating WooCommerce Multilingual Solution: It is a compatibility issue within the YITH WooCommerce Request A Quote Premium, a patch is suggested in https://wpml.org/forums/topic/woocommerce-multilingual-crash-my-site/#post-4048219

0% of people find this useful.

Author Posts
June 10, 2019 at 4:01 pm

maurizioB-11

I am trying to: install WooCommerce Multilingual 4.6.3 May 27, 2019

Link to a page where the issue can be seen: backend message: The site is experiencing technical difficulties. Please check your site admin email inbox for instructions; front-end message: The site is experiencing technical difficulties.

I expected to see: my site

Instead, I got: i removed WooCommerce Multilingual

June 10, 2019 at 5:03 pm #3989007

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

When you see this message in the backend, you usually get an email with more details on the issue. It will have an error message or instructions on how to solve. Would you please share the content of the email?

Can you also activate PHP debugging and try to install WooCommerce Multilingual, errors may be logged in the log file and can help us understand the cause of the issue. Follow the article below to activate PHP debugging then try to install the plugin and share the content of the debug.log file with me.
http://wpml.org/documentation/support/debugging-wpml/

Best regards,
Jamal
WPML Support

June 12, 2019 at 10:50 am #4003193

maurizioB-11

i think there is a problem with another plugin:
yith-woocommerce-request-a-quote

error in email is:

Error Details
=============
An error of type E_ERROR was caused in line 24 of the file /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-emails.php. Error message: Uncaught TypeError: Argument 3 passed to WCML_Emails::__construct() must be an instance of WooCommerce, none given, called in /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/yith-woocommerce-request-a-quote-premium/includes/emails/class.yith-ywraq-multilingual-email.php on line 27 and defined in /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-emails.php:24
Stack trace:
#0 /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/yith-woocommerce-request-a-quote-premium/includes/emails/class.yith-ywraq-multilingual-email.php(27): WCML_Emails->__construct(Object(woocommerce_wpml), Object(SitePress))
#1 /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/yith-woocommerce-request-a-quote-premium/includes/emails/class.yith-ywraq-multilingual-email.php(52): YITH_YWRAQ_Multilingual_Email->__construct()
#2 /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/

June 12, 2019 at 3:40 pm #4005863

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Would you like to test again with the latest version of WCML (4.6.5) we released today?

If it does not resolve the issue, would you deactivate the plugin (yith-woocommerce-request-a-quote-premium), activate WCML then reactivate the plugin.

If there are still errors, we would need to check if it is actually an incompatibility with the plugin or an edge case on your website. To check the first, I have created a new installation on our platform, use the following link to log in.
hidden link
Please configure WPML and WooCommerce similarly to your website, install the Mail logging plugin to catch the sent emails, upload and activate the yith-woocommerce-request-a-quote-premium plugin and try to request a quote. If it gives the same error, it is a compatibility bug, and I'll escalate it to our compatibility team. If it does not, I'll need to take a snapshot of your website using the Duplicator plugin and check this locally.

Best regards,
Jamal

June 13, 2019 at 2:43 pm #4014047

maurizioB-11

i' ve installed latest version of WCML (4.6.5), but it's not working.
i have installed on your platform and the same problem, can you check please?
best regards

June 14, 2019 at 10:25 am
June 14, 2019 at 10:25 am #4020505

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Please try again in this new server. I noted the SSH and SFTP access to investigate the issue. We don't have server access to the previous test installation which is blocking.

Thank you,
Jamal

June 14, 2019 at 1:08 pm #4021607

maurizioB-11

Hi, installed on new server and new crash.
Let me know.
thank you
best regards

June 17, 2019 at 9:45 am #4034075

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

The test server crashes because Translation Management and String Translation were activated before WPML being configured. Please try again.
1. Configure WPML similarly to your website.
2. Activate String Translation and Translation Management.
3. Activate WooCommerce and configure WooCommerce Multilingual.
4. Activate or not Media Translation, similarly to your website.
5. Activate yith-woocommerce-request-a-quote

If the error is not reproduced, please try to request a quote from the frontend to force the issue. If it is reproduced, I'll escalate to our compatibility team for more analysis.

If it is not reproduced, it is probably not a compatibility bug, but rather an edge case reproducible with your website data. I'll create you another server, and I'll send you instructions to migrate your website to that server.

Best regards,
Jamal

June 17, 2019 at 12:19 pm #4035267

maurizioB-11

hi,

1. Configure WPML similarly to your website. -> OK
2. Activate String Translation and Translation Management. -> OK
3. Activate WooCommerce and configure WooCommerce Multilingual. ->
OK
4. Activate or not Media Translation, similarly to your website. -> OK
5. Activate yith-woocommerce-request-a-quote -> site crashed : "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

i let me know.

Best regards

June 17, 2019 at 3:37 pm #4036711

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi,

Thank you. The ticket is now escalated to our compatibility team. I'll get back to you as soon as possible.

Best regards,
Jamal

June 19, 2019 at 6:12 am #4048219

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Our compatibility team suggests a modification to resolve this issue. In file /includes/emails/class.yith-ywraq-multilingual-email.php around line 23 change:

		function __construct(  ) {

			global $woocommerce_wpml, $sitepress;
			// Call parent constructor
			parent::__construct($woocommerce_wpml, $sitepress);

			add_action( 'send_quote_mail_notification', array( $this, 'refresh_email_lang'), 10, 1 );
		}

With:


		function __construct(  ) {

			global $woocommerce_wpml, $sitepress, $woocommerce, $wpdb;
			// Call parent constructor
			parent::__construct($woocommerce_wpml, $sitepress, $woocommerce, $wpdb);

			add_action( 'send_quote_mail_notification', array( $this, 'refresh_email_lang'), 10, 1 );
		}

Please check the Sandbox to see the change. Please check it on your website and let us know if it resolves the issue.

Best regards,
Jamal

July 3, 2019 at 8:26 am #4133207
maurizioB-11

when i try to save a product i have an error and i receveid this email:

Howdy!

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In questo caso, WordPress ha incontrato un errore con uno dei tuoi plugin, WooCommerce Multilingual.

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.

Contatta il tuo host per richiedere assistenza per una investigazione più approfondita di questo problema.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

hidden link

To keep your site safe, this link will expire in 1 giorno. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

Dettagli dell'errore
====================
Un errore di E_ERROR è stato causato nella linea 348 del file /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php. Messaggio di errore: Uncaught Error: Call to a member function get_stock_managed_by_id() on boolean in /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php:348
Stack trace:
#0 /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php(332): WCML_Synchronize_Product_Data->update_stock_value(false, 0)
#1 /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php(172): WCML_Synchronize_Product_Data->sync_product_stock(Object(WC_Product_Simple), false)
#2 /var/www/vhosts/optikascience.com/httpdocs/optikascience/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php(132): WCML_Synchronize_Product_Data->sync_product_data(119048, '154376', 'es')
#3 /var/www/vhosts/optika

New threads created by Jamal and linked to this one are listed below:

https://wpml.org/forums/topic/php-errors-when-saving-a-product/

July 3, 2019 at 10:37 am #4134945

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi,

For support rules, we are able to handle only one issue at the time. This helps us to bring you a better service and also help other users to find all the information here exposed.

For that reason, I have created a new ticket for this issue, and I will be posting my replies there.

Let us keep working on the first issue in this ticket. Was it resolved with the patch we suggested?

Best regards,
Jamal

July 4, 2019 at 10:21 am #4142263

maurizioB-11

My issue is resolved now. Thank you!