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 14 replies, has 2 voices.

Last updated by Bigul 5 months, 4 weeks ago.

Assigned support staff: Bigul.

Author Posts
April 30, 2019 at 6:12 am #3708047

matijaP

Hi,
with the updates this looks to be fixed. I will check it during the week if really works out.

But we still get slow query. Can this be fixed?

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='sl' and su.url='[^/]+/([^/]+)/?$') or (su.language='sl' and su.url IS NULL)
+
WPML_ST_Page_Translations_Persist->get_translations_for_page()
Plugin: wpml-string-translation 2721 0,0921

April 30, 2019 at 6:59 am #3708387

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.

Please try the following troubleshooting steps after a site backup and make sure the issue is existing or not.

1) Go to WPML>>Support page

2) Click on Troubleshooting link (blue link in the middle of the page)

3) In Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one.

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Recreate ST DB cache tables

--
Thanks!

Bigul

May 3, 2019 at 3:42 pm #3736265

matijaP

Hi,

i did all the necessary steps but issue still persist. Is there anything else we can try?

May 3, 2019 at 5:18 pm #3737249

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the feedback. I would like to access the admin area of your site for further checking. Please fill the private details fields after a full site backup.

Please check the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

May 7, 2019 at 7:34 am #3754779

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the login information. I have activated the Query Monitor plugin again. Just to make sure this slow query is only showing on the frontend of the site, am I right?

Please share with me the WordPress debug.log (not WPML debug information) for more details.

Please check this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check you are getting any errors or warning related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).

--
Thanks!

Bigul

May 8, 2019 at 7:01 am #3764251

matijaP

Hi,
here is latest debug info: https://pastebin.com/Eduy2dkx

May 8, 2019 at 2:18 pm #3767629

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. I would like to try couple of tests on this. 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

May 9, 2019 at 7:20 am #3773621

matijaP

Hi,
i allow you to make a duplicate of my site.

May 9, 2019 at 7:16 pm #3779063

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for your permission. I made a Duplicator copy of the site now. Will debug it further and get back to you soon. Please wait.

--
Thanks!

Bigul

May 10, 2019 at 2:14 pm #3785373

Bigul
Supporter

Languages: English (English )

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

Hello,

For your kind updates, the issue is existing on my local copy after the initial debugging steps. So I forwarded the details to our second tier team and waiting for the feedback now.

We will get back to you as early as possible. Please wait.

--
Thanks!

Bigul

May 20, 2019 at 4:28 am #3843595

Bigul
Supporter

Languages: English (English )

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

Hello,

For your kind information, these slow queries are not showing in Query Monitor for us after the following troubleshooting steps. Please try it after a full site backup and let me know your feedback.

1) Visit WPML>>Support>>Troubleshooting
2) Scroll to the bottom of the screen and click on *Recreate ST DB cache tables* button
3) Deactivate WPML String Translation plugin
4) Log in to Database via PHPMyAdmin or similar tools
5) Run the following queries

TRUNCATE TABLE wp_icl_string_pages

TRUNCATE TABLE wp_icl_string_urls
ALTER TABLE `wp_icl_string_pages`
      ADD UNIQUE INDEX `string_id_and_url_id` (`string_id`, `url_id`);

6) Activate WPML String Translation plugin
7) Check the slow queries are existing or not

--
Thanks!

Bigul

May 20, 2019 at 7:28 am #3844157

matijaP

Hi,

i did exactly as you suggested but now i have even more slow queries:

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='sl' and su.url='/izdelki/sup-oprema/sup-deske/') or (su.language='sl' and su.url IS NULL)
+
WPML_ST_Page_Translations_Persist->get_translations_for_page()
Plugin: wpml-string-translation 2279 0,1068
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='sl'
AND s.language!='sl'
WHERE s.context = 'woocommerce'
LIMIT 1000 OFFSET 4000
+
WPML_DB_Chunk->retrieve()
Plugin: sitepress-multilingual-cms 1000 0,0512
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='sl'
AND s.language!='sl'
WHERE s.context = 'woocommerce'
LIMIT 1000 OFFSET 5000
+
WPML_DB_Chunk->retrieve()
Plugin: sitepress-multilingual-cms 1000 0,0568
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='en' and su.url='izdelki/(.+?)/?$') or (su.language='en' and su.url IS NULL)
+
WPML_ST_Page_Translations_Persist->get_translations_for_page()
Plugin: wpml-string-translation 3003 0,0658
SELECT post_id
FROM wp_postmeta
WHERE meta_key = '_wp_attached_file'
AND meta_value = 'logo.png'
+
WPML_DB_Chunk->retrieve()
Plugin: sitepress-multilingual-cms 1000 0,0518
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='sl'
AND s.language!='sl'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 7000

May 20, 2019 at 4:47 pm #3849109

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the feedback. I would like to make a new Duplicator copy of your site for further debugging. But now not able to login to the site because of the wrong user name or password. Please check.

--
Thanks!

Bigul

May 21, 2019 at 7:15 am #3852483

matijaP

Hi,
i updated password to old one, now should work again.

May 21, 2019 at 2:12 pm #3856091

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. But still, we are not able to login to the site. Please check. It showing the following warning.

NAPAKA: Geslo, ki ste ga vnesli za uporabniško ime ****, je nepravilno. Ste pozabili geslo?

--
Thanks!

Bigul

The topic ‘[Closed] Split: Slow quires from WPML String Translation’ is closed to new replies.