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 22 replies, has 3 voices.

Last updated by Sumit 8 months, 4 weeks ago.

Assigned support staff: Sumit.

Author Posts
December 17, 2018 at 3:29 pm

Olivier

This is for the hidden link website, which is a live website.

Since upgrading to WordPress 5.0 (and then 5.0.1) every time I try to activate String Translations the website crashes with an error 500. The debug.log contains the following error every time a page is loaded (site is in French):


Erreur de la base de données WordPress Lost connection to MySQL server during query pour la requête 
			SELECT
				s.id,
				st.status,
				s.domain_name_context_md5 AS ctx ,
				st.value AS translated,
				st.mo_string AS mo_string,
				s.value AS original,
				s.gettext_context
			FROM wp_icl_strings s
			LEFT JOIN wp_icl_string_translations st
				ON s.id=st.string_id
					AND st.language='fr'
					AND s.language!='fr'
			WHERE s.context = 'default'
			 LIMIT 1000 OFFSET 6000 faite par require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/twentynineteen/index.php'), get_header, locate_template, load_template, require_once('/themes/twentynineteen/header.php'), wp_head, do_action('wp_head'), WP_Hook->do_action, WP_Hook->apply_filters, feed_links, _x, translate_with_gettext_context, apply_filters('gettext_with_context'), WP_Hook->apply_filters, icl_sw_filters_gettext_with_context, icl_sw_filters_gettext, icl_translate, WPML_Register_String_Filter->translate_by_name_and_context, WPML_Displayed_String_Filter->get_translation, WPML_ST_DB_Cache->get_translation, WPML_ST_DB_Translation_Retrieve->get_translation, WPML_ST_DB_Translation_Retrieve->load, WPML_DB_Chunk->retrieve

The error disappears and the site works again as soon as I disable String Translations.

The problem occurs on basic WordPress themes (Twenty fifteen to Twenty Nineteen) and with all other plugins disabled. I have tried to completely remove and delete all WPML plugins and add them again. As soon as I finish the initial configuration the site crashes again with the same error in the log.

I have tried all the options on the WPML technical support page, short of resetting everything.

December 18, 2018 at 8:26 am #3011258

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

The error will also happen when you activate WPML String Translation version 2.9.1, am I right?

Please check is there any difference when WPML Translation Management(2.7.1) plugin is active.

Also please check you are getting any error in the server error log when WPML String Translation is active.

Which type of hosting you are using, Shared or VPS?

--
Thanks!

Bigul

December 18, 2018 at 1:10 pm #3012251

Olivier

Hello Bigul,

The error happens with String Translations 2.9.1 or 2.9.0. I wasn't able to try earlier versions as they were apparently not compatible with the latest version of WPML itself.

I could not find any difference when WPML Translation Management is active.

There is no error in the error log related to this problem.

The site is hosted on GoDaddy Shared hosting.

Thanks!

December 18, 2018 at 7:13 pm #3013655

Olivier

I have updated the theme to the latest version, Enfold 4.5.2. No change in the situation, the error still occurs every time String Translation is activated or loaded.

December 19, 2018 at 7:14 am #3015023

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the feedback. It requires further checking. So please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server.

--
Thanks!

Bigul

December 19, 2018 at 12:48 pm #3016413

Olivier

Hello Bigul,

Duplicator is installed and the Duplicator package is ready. How can I share the link and the password with you?

December 19, 2018 at 3:32 pm #3017309

Olivier

If it's faster for you, please create your own Duplicator Package and import it. Just be sure to password-protect it so that's as secure as possible.

Thanks!

December 19, 2018 at 4:39 pm #3017617

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. I am downloading the Duplicator package now. The private option is enabled for the next reply. Please share me the password for the Duplicator package.

--
Thanks!

Bigul

December 19, 2018 at 5:16 pm
December 20, 2018 at 1:22 pm #3020875

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

I have configured the Duplicator package on my local servers. Without deactivating other plugins and with your theme, the site is loading as normal. Please check the following screencast for more details.

hidden link

Also, the site(my local copy) is not showing any error in the Debug.log. Therefore I have forwarded details to our second tier team for the expert opinion and waiting for their feedback. Please wait. We will get back to you soon.

--
Thanks!

Bigul

December 21, 2018 at 1:04 pm #3024888

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

For your kind updates, we are not able to reproduce the issue on our servers. Therefore we have the following requests.

a) We have released a new version of WPML 4.1.3. Please upgrade to the latest version after a site backup and check is there any difference in the result

b) If possible, please visit WPML>>Support>>Troubleshooting page after activating WPML String Translation. Then click on *Recreate ST DB cache tables* button and make sure the issue is existing or not

c) If you are still having the issues, please contact your hosting and check if they have any more information/suggestion about the issue

--
Thanks!

Bigul

January 4, 2019 at 1:50 pm #3056662

Olivier

Hello,

I have tried everything you mentioned and the issue persists. I had a chat with a customer support representative from GoDaddy who mentioned that the WPML & String Translations plugins might simply be incompatible with their hosting and that I should try to use other translating plugins. Is this possible?

January 4, 2019 at 6:34 pm #3057587

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. Which plan of Godaddy you are using now. Please share more details about it.

Just to make sure please try the following steps and let me know your feedback.

1) Create a test site(fresh WordPress installation) on the same server space(For an example with subdomain)
2) Install & configure WPML core plugin
3) Activate WPML String Translation plugin
4) Then check the issue is existing or not

--
Thanks!

Bigul

January 7, 2019 at 3:04 pm #3063258

Olivier

Hello,

I created an empty subdomain and installed only WPML and String Translation. As soon as WPML is configured and while String Translation is active, the site becomes very slow (23.5s to 28s loading time for a very simple page). The site is normal (~850ms to 1.25s loading time) when String Translation is deactivated.

I have tested this both with the base theme (Twenty Nineteen) and the Enfold Child Theme I am using on the official website. Results are the same with both themes.

The site doesn't crash completely however I believe that if I started adding widgets and more content it would eventually cause the same error.

January 7, 2019 at 7:18 pm #3064152

Olivier

So I dug a little further with the Query Monitor plugin and found that the following functions and queries take a lot of time. The same queries executed through phpMyAdmin take ~100-200ms so I can only assume that it's the PHP code following the queries that is slowing down the site. I cannot understand why it would slow down while using GoDaddy hosting and not on other servers.

WPML_ST_Page_Translations_Persist->get_translations_for_page(): 5,0633s.

SELECT DISTINCT s.id, s.name, s.context, st.status, s.gettext_context, st.value AS tra, st.mo_string AS mo_string, s.value AS orig 
FROM wp_icl_string_pages sp 
INNER JOIN wp_icl_string_urls su 
ON su.id = sp.url_id 
INNER JOIN wp_icl_strings s 
ON s.id = sp.string_id 
LEFT JOIN wp_icl_string_translations st 
ON s.id=st.string_id 
AND st.language=su.language 
AND s.language!=su.language 
WHERE (su.language='fr' and su.url='/') or (su.language='fr' and su.url IS NULL)

WPML_DB_Chunk->retrieve(): between 2s and 4.6s each call. Called 7 times because of the number of rows.

SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context 
FROM wp_icl_strings s 
LEFT JOIN wp_icl_string_translations st 
ON s.id=st.string_id 
AND st.language='fr' 
AND s.language!='fr' 
WHERE s.context = 'default' 
LIMIT 1000 OFFSET 0

These call times are not normal. I don't think I have access to server-side profiling tools but I will try to keep digging. Any help is welcome.

The topic ‘[Closed] WPML String Translations causes "Lost connection to MySQL during query" error’ is closed to new replies.