Skip Navigation

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

Problem:
The client was experiencing a critical error when trying to create a new product or page. The debug log indicated an issue with the WPML plugin, specifically an InvalidArgumentException related to the WPML_Translation_Element class.

Solution:
We recommended checking the database to ensure that auto increments are set properly, particularly for the following tables:

  • wp_icl_translations
  • wp_icl_translation_status
  • wp_icl_strings

Additionally, we suggested checking other wp_icl tables. To access the database, we provided links to two WordPress plugins that could be used:

If you're experiencing this issue, we recommend you try the steps above. However, the solution might be irrelevant if it's outdated or not applicable to your case. In such instances, we highly recommend checking 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 1 reply, has 2 voices.

Last updated by Bruno Kos 7 months, 3 weeks ago.

Assisted by: Bruno Kos.

Author Posts
May 2, 2024 at 11:53 am #15586968

dainiusV-2

Hello, I want to create new product or page. And I get critical error. I figured out that is _actionscheduler tables, but other plugins normally writes data to that tables.
Here is debug log:
[02-May-2024 11:48:46 UTC] PHP Fatal error: Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0. in /home/stiams/domains/kompozitas.eu/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:29
Stack trace:
#0 /home/stiams/domains/kompozitas.eu/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(41): WPML_Translation_Element->__construct()
#1 /home/stiams/domains/kompozitas.eu/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(33): WPML_Translation_Element_Factory->create_post()
#2 /home/stiams/domains/kompozitas.eu/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/words-count/hooks/wpml-tm-word-count-refresh-hooks.php(49): WPML_Translation_Element_Factory->create()
#3 /home/stiams/domains/kompozitas.eu/public_html/wp-includes/class-wp-hook.php(324): WPML_TM_Word_Count_Refresh_Hooks->{closure}()
#4 /home/stiams/domains/kompozitas.eu/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#5 /home/stiams/domains/kompozitas.eu/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#6 /home/stiams/domains/kompozitas.eu/public_html/wp-includes/load.php(1270): do_action()
#7 [internal function]: shutdown_action_hook()
#8 {main}
thrown in /home/stiams/domains/kompozitas.eu/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 29

May 2, 2024 at 1:32 pm #15587568

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Thank you for contacting WPML support!

Can you check your database and make sure that auto increments are set properly? I suggest you check these tables first:

wp_icl_translations
wp_icl_translation_status
wp_icl_strings

But also other wp_icl tables. You can use https://wordpress.org/plugins/pexlechris-adminer/ to access database or https://wordpress.org/plugins/wp-phpmyadmin-extension/ for this (if you don't have other means for it).

Regards,
Bruno Kos

auto increment.png
May 2, 2024 at 2:51 pm #15588167

dainiusV-2

Thank you! It was indexes and auto_increment because I manually cleared some tables, I reuploaded fixed database and now everything is fine.