Skip Navigation

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

Problem:
The client is experiencing slow loading and saving times for pages and posts after installing WPML, along with technical errors reported by WordPress.

Solution:
We recommend trying the minimum environment procedure to identify if the issue is due to a conflict with the theme or another plugin. Here are the steps:
1. Switch to a default WordPress theme, such as TwentyTwenty-Four.
2. Deactivate all plugins except for WPML and its add-ons.
3. Check if the problem persists. If it does not, reactivate the plugins one by one to identify the problematic plugin.

It's crucial to make a full site backup before proceeding with these steps. If your site is live, consider performing these tests in a staging environment.

If the issue persists even when WPML is deactivated, it suggests that the problem might not be with WPML. In this case, enable WordPress's debug log to gather more information about the errors. You can enable debugging by modifying your wp-config.php file:

define('WP_DEBUG', true);<br />define('WP_DEBUG_LOG', true);<br />define('WP_DEBUG_DISPLAY', false);<br />@ini_set('display_errors', 0);

After enabling debugging, reproduce the actions causing the slowness and check the debug.log file in the /wp-content/ directory for errors.

If these steps do not resolve the issue, or if the solution seems outdated or irrelevant to your 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 with us for further assistance.

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.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Itamar 3 months, 3 weeks ago.

Assisted by: Itamar.

Author Posts
August 4, 2024 at 7:09 am #16036167

juergenS-23

<b>Hintergrund des Themas: </b>
I have just installed WPML via the OTG installer on this brand new site hidden link. I am also experiencing the same issue on a number of sites where the loading speeds are even worse, making it extremely time-consuming to perform the simplest tasks. Error Details: An error of type E_ERROR was caused in line 100 of the file /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/translation-priorities/class-wpml-tm-translation-priorities.php. Error message: Uncaught Error: Cannot use object of type WP_Error as array in /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/translation-priorities/class-wpml-tm-translation-priorities.php:100 Stack trace: #0 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-tm-upgrade-translation-priorities-for-posts.php(21): WPML_TM_Translation_Priorities::insert_missing_default_terms() #1 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-tm-upgrade-translation-priorities-for-posts.php(28): WPML_TM_Upgrade_Translation_Priorities_For_Posts->run() #2 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(159): WPML_TM_Upgrade_Translation_Priorities_For_Posts->run_admin() #3 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(147): WPML_Upgrade->maybe_run_admin() #4 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(131): WPML_Upgrade->run_command() #5 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(116): WPML_Upgrade->run_commands() #6 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(80): WPML_Upgrade->run_admin() #7 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-tm-upgrade-loader.php(99): WPML_Upgrade->run() #8 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-includes/class-wp-hook.php(324): WPML_TM_Upgrade_Loader->wpml_tm_upgrade() #9 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #10 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-includes/plugin.php(517): WP_Hook->do_action() #11 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-settings.php(700): do_action() #12 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-config.php(96): require_once('/homepages/11/d...') #13 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-load.php(50): require_once('/homepages/11/d...') #14 /homepages/11/d1016018939/htdocs/elgordoticketsonline.com/wp-admin/admin.php(34): require_once('/homepages/11/d...') #15 {main} thrown

<b>Die Symptome: </b>
Pages and posts take way too long to load or save (up to 1-2 minutes). I am also getting emails from WP saying there is a technical error.

<b>Fragen: </b>
How can I resolve the slow loading and saving times for pages and posts after installing WPML?
What steps should I take to fix the technical error mentioned in the email from WP?

This is what my wp-config.php looks like:

-- removed by the support team --

Question: where do I add the code for:
/** Memory Limit */ define('WP_MEMORY_LIMIT', '128M'); define( 'WP_MAX_MEMORY_LIMIT', '128M' );

August 4, 2024 at 7:23 am #16036176

juergenS-23

I have now inserted the memory limit setting correctly in the wp-config.php, but the load speed issue persists. Even after setting it to 256.

August 4, 2024 at 6:54 pm #16037104

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,
Important!!!
Our forum is public. It is not a private discussion/thread only between you and us. So please refrain from posting sensitive information in public replies. I have removed the content of the wp-config.php file of your WordPress installation from the previous reply. For your site's safety, please change the sensitive details from the wp-config.php file..

I'm consulting our second-tier supporters about the error you're getting. I'll update you here once they reply.

Regards,
Itamar.

August 5, 2024 at 12:00 pm #16039541

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

Our second-tier supporter suggests trying the minimum environment procedure.

We suspect that a collision with the theme or another plugin might cause this problem. If possible, get your site into a minimum environment, switching to a default WordPress theme like TwentyTwenty-Four and having no plugins activated except WPML.

First, you must check if the problem persists when just the theme is switched to TwentyTwenty-Four (for example). If it persists, deactivate all plugins except the WPML and its add-ons. Then please check if the problem persists. If it does not persist, start by activating the plugins individually and check when the problem comes back, then report to me which plugin was the culprit.


**** Important! Please make a full site backup (files and DB) before you proceed with those steps****


*** If your site is live, you might want to try those procedures in a staging environment or a snapshot of your site on your local server or another server. ***

Regards,
Itamar.

August 6, 2024 at 5:37 am #16042449

juergenS-23

I did deactivate all plugins and switched to the base WP theme. The problem is still the same.
I then deactivated and deleted WPML completely, and the site is still loading slow.
And the load speed issue definitely started with WPML ...
Actually, I have the same issue on a number of other websites, and I can see loads of other webmasters having similar issues

August 6, 2024 at 10:28 am #16043473

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, and thanks for trying my suggestions.

If the slowness proceeds when WPML is deactivated, then the problem is not with WPML. Please also investigate in other direction and consult the support of your hosting service.

Of course, we will continue to help you investigate whether WPML is causing any performance issues on your site. While WPML is active, please enable WordPress's debug log and check for PHP errors.

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:

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);

After this, repeat the action that causes the problem on your site. Visit a few pages where the performance (slowness) issue occurs. The errors will be saved to a debug.log log file inside the /wp-content/ directory. Then please share the errors with us.

Thanks,
Itamar.

August 6, 2024 at 11:09 am #16043592

juergenS-23

I had changed my wp-config to this already but the site isn't displaying any errors.

August 6, 2024 at 11:57 am #16043726

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, and thanks for trying my suggestions.

Please try the troubleshooting section and check if it helps with the performance issue while WPML is active.

1. Take a backup of the DB of your site.

2. Go to WPML -> Support -> Troubleshooting (link)

3. Once on the troubleshooting screen, press the following buttons and check if it helps. Press each button at a time and wait for the process to complete.

- 'Disable cache for language switcher templates'

- 'Clear language information and repopulate languages' button (if it is showing)

- 'Synchronize posts taxonomies' for all the different post types

- 'Clear the cache in WPML'

- 'Remove ghost entries from the translation tables'

- 'Fix element_type collation'

- 'Fix WPML tables collation'

- 'Synchronize local job ids with ATE jobs'

- 'Synchronize translators and translation managers with ATE'

- 'Assign translation status to duplicated content'

- 'Set language information'

- 'Reset languages' Press this button only if you didn't add a custom language!

- 'Fix terms count'

- 'Fix post type assignment for translations'

- 'Cleanup and optimize string tables'

- 'Clear invalid strings'

*** Please backup your database before using this.***

Does it help to improve your site's performance when WPML is active?

Please also take a look at the following guide on how we debug performance issues.

https://wpml.org/faq/prevent-performance-issues-with-wpml/

Regards,
Itamar.

August 16, 2024 at 8:32 am #16077352

juergenS-23

I had to rebuild that site from scratch (because of my mistake publishing sensitive data - someone used that data to hack the site, before you intervened and deleted that content...).
Anyway, I did set the site up with a base theme, first installed WPML, then added the plugins one by one, while checking whether speed issues showed up. They did not.
Then I added a new theme and that theme seems top work ok with WPML. Unfortunately, due to the hack, I can't tell you which theme was used before. But at least now it is safe to assume that it would be the theme if that issue ever re-appears.

That said, we have a few sites where we are experiencing the same issues. Unfortunately, for those sites, we cannot just use a different theme, because it is a custom one developed by my team.
But we will be going through the steps you suggested earlier to fix those problems.

For those websites, WP keeps sending reports about issues on the site that are WPML related. I am pasting the details here - could you please take a look and see if you have any additional suggestions as to what might cause them?

Error Details
=============
An error of type E_ERROR was caused in line 193 of the file /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/records/class-wpml-tm-icl-translations.php. Error message: Uncaught InvalidArgumentException: No translation entry found for query: s:34:" trid = %d AND language_code = %s ";a:2:{i:0;s:4:"3767";i:1;s:2:"da";} in /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/records/class-wpml-tm-icl-translations.php:193
Stack trace:
#0 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/records/class-wpml-tm-icl-translations.php(67): WPML_TM_ICL_Translations->select_translation_id()
#1 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/records/class-wpml-tm-icl-translations.php(43): WPML_TM_ICL_Translations->build_from_trid()
#2 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/records/class-wpml-tm-records.php(161): WPML_TM_ICL_Translations->__construct()
#3 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-post-actions.class.php(67): WPML_TM_Records->icl_translations_by_trid_and_lang()
#4 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php(947): WPML_TM_Post_Actions->save_post_actions()
#5 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/class-wp-hook.php(324): wpml_tm_save_post()
#6 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#7 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#8 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(213): do_action()
#9 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-admin-post-actions.class.php(123): WPML_Post_Translation->after_save_post()
#10 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/class-wp-hook.php(326): WPML_Admin_Post_Actions->save_post_actions()
#11 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#12 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#13 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/post.php(4891): do_action()
#14 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/post.php(4993): wp_insert_post()
#15 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-admin/includes/post.php(453): wp_update_post()
#16 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-admin/includes/post.php(2163): edit_post()
#17 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-admin/includes/misc.php(1355): wp_autosave()
#18 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/class-wp-hook.php(326): heartbeat_autosave()
#19 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#20 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-admin/includes/ajax-actions.php(3503): apply_filters()
#21 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/class-wp-hook.php(324): wp_ajax_heartbeat()
#22 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#23 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#24 /var/www/vhosts/jackpotlotteryonline.com/httpdocs/wp-admin/admin-ajax.php(192): do_action()
#25 {main}
thrown

August 18, 2024 at 5:50 pm #16081715

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

According to another report, the error message resembles the error you shared, so it might be a problem in the site's database. The table wp_icl_translations is corrupt.
It is missing indexes, auto-increment, and proper field lengths. You can see the other ticket here.

https://wpml.org/it/forums/topic/fatal-error-uncaught-invalidargumentexception-no-translation-entry-found-for-query-2/

The client restored the site from a backup in that ticket, which solved the problem.

But if you can't do that, we can try to help.

This ticket initially concerned another problem on another website. Please open a new ticket in our forum and add the details of the related website. It would be helpful if you mentioned this ticket in the new ticket.

Regards,
Itamar.