Skip Navigation

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

Problem:
The client was experiencing a critical error on their site after purchasing and attempting to activate WPML. The error persisted even after deactivating all other plugins and switching to the default WordPress theme.

Solution:
We identified that the issue was due to corrupted default WordPress tables, specifically missing auto increments in the

wp_users

,

wp_usermeta

, and

wp_options

tables, with many entries having an ID of '0'. We provided a solution that involved running SQL queries to delete the bad data and alter the tables to add the necessary auto increments. The client needed to execute the following queries one by one:

DELETE FROM `wp_users` WHERE `ID` = '0';

ALTER TABLE `wp_users` CHANGE `ID` `ID` bigint unsigned NOT NULL AUTO_INCREMENT FIRST;

DELETE FROM `wp_usermeta` WHERE `umeta_id` = '0';

ALTER TABLE `wp_usermeta` CHANGE `umeta_id` `umeta_id` bigint unsigned NOT NULL AUTO_INCREMENT FIRST;

DELETE FROM `wp_options` WHERE `option_id` = '0';

ALTER TABLE `wp_options` CHANGE `option_id` `option_id` bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;

We advised the client to back up their database before making any changes. If the client was not comfortable performing these steps or if the solution did not resolve the issue, we recommended seeking further assistance, as this was beyond the scope of our support.

Please note that this solution might be irrelevant due to being outdated or not applicable to your case. If you're still facing issues, we highly recommend checking the related 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.

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

Last updated by Andrey 11 months, 4 weeks ago.

Assisted by: Andrey.

Author Posts
April 28, 2024 at 11:51 am #15573891

adityaK-4

I buy this for my client because they were using this plugin's nulled version and I showing error because of the plugin was outdated. and i buy this and then when I try to install and activate my site jaime-suarez.com showing critical error

I tried by deactivating all plugins and activate this only and still facing the same issue

and then I tried changing the theme to default twenty-twenty-four theme and still facing the same error critical error

I purchased this plugin and now I am not able to use this plugin

what should I do?

Screenshot (16).png
April 28, 2024 at 7:20 pm #15574262

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Could you try to download the fresh WPML plugins and manually install them?

Instructions:
https://wpml.org/faq/how-to-manually-install-wordpress-plugins/

Downloads:
https://wpml.org/account/downloads

Before proceeding with any updates, please remember to back up your database first.

April 29, 2024 at 4:29 am #15574563

adityaK-4

I tried that and both ways. Not working

April 29, 2024 at 6:07 am #15574644

adityaK-4

Please replay fast

April 29, 2024 at 7:22 am #15575059

adityaK-4

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\translation-priorities\class-wpml-tm-translation-priorities.php:100 Stack trace: #0 C:\xampp\htdocs\jaime\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 C:\xampp\htdocs\jaime\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 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(159): WPML_TM_Upgrade_Translation_Priorities_For_Posts->run_admin() #3 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(147): WPML_Upgrade->maybe_run_admin(Object(WPML_TM_Upgrade_Translation_Priorities_For_Posts)) #4 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(131): WPML_Upgrade->run_command(Object(WPML_Upgrade_Command_Definition), 'maybe_run_admin') #5 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(116): WPML_Upgrade->run_commands(Array, 'maybe_run_admin') #6 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(80): WPML_Upgrade->run_admin() #7 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-tm-upgrade-loader.php(99): WPML_Upgrade->run() #8 C:\xampp\htdocs\jaime\wp-includes\class-wp-hook.php(324): WPML_TM_Upgrade_Loader->wpml_tm_upgrade('') #9 C:\xampp\htdocs\jaime\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #10 C:\xampp\htdocs\jaime\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #11 C:\xampp\htdocs\jaime\wp-settings.php(695): do_action('init') #12 C:\xampp\htdocs\jaime\wp-config.php(98): require_once('C:\\xampp\\htdocs...') #13 C:\xampp\htdocs\jaime\wp-load.php(50): require_once('C:\\xampp\\htdocs...') #14 C:\xampp\htdocs\jaime\wp-admin\admin.php(34): require_once('C:\\xampp\\htdocs...') #15 C:\xampp\htdocs\jaime\wp-admin\plugins.php(10): require_once('C:\\xampp\\htdocs...') #16 {main} thrown in C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\translation-priorities\class-wpml-tm-translation-priorities.php on line 100

this is the error iam getting

April 29, 2024 at 8:28 am #15575497

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Can you turn off all plugins temporarily except WPML to see if the issue persists? Also, please make a quick test with the default theme if possible.

April 29, 2024 at 8:53 am #15575650

adityaK-4

i already did that and still facing the issue

April 29, 2024 at 9:03 am #15575814

adityaK-4

Please the error message i send you

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\translation-priorities\class-wpml-tm-translation-priorities.php:100 Stack trace: #0 C:\xampp\htdocs\jaime\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()

April 29, 2024 at 9:05 am #15575820

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Can you please specify the version of WPML that you upgraded from?

I need to request temporary access (wp-admin and FTP) to your site – preferably to a test site where the problem has been replicated if possible – in order to be of better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Let me know where the issue can be replicated.

April 29, 2024 at 10:56 am #15576666

adityaK-4

hi, is there any more details need?

please let me know...

April 29, 2024 at 11:50 am #15576914

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Please make sure to update your WPML plugin and add-ons to the latest version, which is 4.6.10. This will ensure you can benefit from the latest bug fixes and improvements.

To check the latest versions, please go to "My Account -> Downloads" on this site. You can find instructions on how to update by following this link: http://wpml.org/faq/install-wpml/.

Once you have installed the latest plugins, please let me know if you are still experiencing the issue. I will also need the FTP access if there is still a problem.

April 29, 2024 at 1:09 pm #15577309

adityaK-4

I Updated the other wpml addon plugins and after that i install the WPML Plugin and still facing the critical error.

i tried this in my localhost.

what i think is i read some articles and fount this https://wpml.org/forums/topic/critical-error-on-website-after-installation/

there saying that something outdated in database and need to change or something

because when i read the error text there mensioned something like :
WPML_TM_Translation_Priorities::insert_missing_default_terms()

This is the full error message :

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\translation-priorities\class-wpml-tm-translation-priorities.php:100 Stack trace: #0 C:\xampp\htdocs\jaime\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 C:\xampp\htdocs\jaime\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 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(159): WPML_TM_Upgrade_Translation_Priorities_For_Posts->run_admin() #3 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(147): WPML_Upgrade->maybe_run_admin(Object(WPML_TM_Upgrade_Translation_Priorities_For_Posts)) #4 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(131): WPML_Upgrade->run_command(Object(WPML_Upgrade_Command_Definition), 'maybe_run_admin') #5 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(116): WPML_Upgrade->run_commands(Array, 'maybe_run_admin') #6 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-upgrade.php(80): WPML_Upgrade->run_admin() #7 C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\upgrade\class-wpml-tm-upgrade-loader.php(99): WPML_Upgrade->run() #8 C:\xampp\htdocs\jaime\wp-includes\class-wp-hook.php(324): WPML_TM_Upgrade_Loader->wpml_tm_upgrade('') #9 C:\xampp\htdocs\jaime\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #10 C:\xampp\htdocs\jaime\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #11 C:\xampp\htdocs\jaime\wp-settings.php(695): do_action('init') #12 C:\xampp\htdocs\jaime\wp-config.php(98): require_once('C:\\xampp\\htdocs...') #13 C:\xampp\htdocs\jaime\wp-load.php(50): require_once('C:\\xampp\\htdocs...') #14 C:\xampp\htdocs\jaime\wp-admin\admin.php(34): require_once('C:\\xampp\\htdocs...') #15 C:\xampp\htdocs\jaime\wp-admin\plugins.php(10): require_once('C:\\xampp\\htdocs...') #16 {main} thrown in C:\xampp\htdocs\jaime\wp-content\plugins\sitepress-multilingual-cms\classes\translation-priorities\class-wpml-tm-translation-priorities.php on line 100

There has been a critical error on this website. Please check your site admin email inbox for instructions.

Learn more about troubleshooting WordPress.

April 29, 2024 at 1:18 pm #15577324

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback. I will check this further and let you know.

April 29, 2024 at 1:18 pm #15577325

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

If I need to further debug the problem, I want to ask you about the possibility of replicating your site locally. For this, I'll need to install a "Duplicator" plugin on your site temporarily. This will allow me to create a copy of your site and your content. If you prefer to do it independently, you can provide me with the snapshot and send me the installer file and the zipped package you downloaded.

Let me know how you feel about this.

April 29, 2024 at 1:21 pm #15577329

adityaK-4

You can do that and please solve the issue as soon as possible...