Skip Navigation

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

Last updated by alexanderK-76 4 years, 11 months ago.

Assisted by: Bobby.

Author Posts
November 19, 2019 at 1:07 pm #4972551

alexanderK-76

I am trying to: Update pages and posts
Since yesterday we're not able to create new posts and pages or update existing ones.
Last week it was working fine.

The following error occurs when I update or add pages and posts:
Fatal error: Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0. in /homepages/3/d804630791/htdocs/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28 Stack trace: #0 /homepages/3/d804630791/htdocs/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(35): WPML_Translation_Element->__construct(0, Object(SitePress), NULL) #1 /homepages/3/d804630791/htdocs/wordpress/wp-content/plugins/wpml-translation-management/classes/words-count/hooks/wpml-tm-word-count-refresh-hooks.php(39): WPML_Translation_Element_Factory->create(0, 'post') #2 /homepages/3/d804630791/htdocs/wordpress/wp-includes/class-wp-hook.php(290): WPML_TM_Word_Count_Refresh_Hooks->refresh_post_word_count(0) #3 /homepages/3/d804630791/htdocs/wordpress/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array) #4 /homepages/3/d804630791/htdocs/wordpress/wp-includes/plugin.php(478): WP_Hook->do_a in /homepages/3/d804630791/htdocs/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 28

Another Error occurs when I try to add a new user:

Warning: in_array() expects parameter 2 to be array, null given in /homepages/3/d804630791/htdocs/wordpress/wp-content/plugins/wpml-translation-management/classes/user/class-wpml-all-admins-to-translation-managers.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at /homepages/3/d804630791/htdocs/wordpress/wp-content/plugins/wpml-translation-management/classes/user/class-wpml-all-admins-to-translation-managers.php:40) in /homepages/3/d804630791/htdocs/wordpress/wp-includes/pluggable.php on line 1265

Warning: Cannot modify header information - headers already sent by (output started at /homepages/3/d804630791/htdocs/wordpress/wp-content/plugins/wpml-translation-management/classes/user/class-wpml-all-admins-to-translation-managers.php:40) in /homepages/3/d804630791/htdocs/wordpress/wp-includes/pluggable.php on line 1268

I tried debugging by:
- synch post and page taxonomies
- remove WPML ghost entries
- delete WPML cache
...
with no success

November 20, 2019 at 6:50 am #4977047

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

We have just released a new version.

If possible please update to WPML 4.3.4 and let me know your results.

November 20, 2019 at 8:40 am #4977579

alexanderK-76

Hello Bobby,
thanks for the update, I installed it (manually, WP didn't give me an update notice yet)
I'm still getting the error messages.
Again tried the first four debugging optins on the debugging page (as before) with no result.
Cannot add or edit pages and posts, also cannot add new users.
Best regards

November 20, 2019 at 11:43 pm #4984653

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed I recommend taking FULL BACKUP of your database and your website.**
I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/

You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

November 21, 2019 at 10:15 pm #4993459

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for the access details!

I was able to reproduce this issue on my local environment, and have escalated this to our developers to take a closer look.

Once I have some news I will update you here.

November 25, 2019 at 9:43 am #5009557

alexanderK-76

Hello,
do you have anby update?
We urgendtly need to update our website content, the wpml bug makes it not possible to update or add posts. Or do you have any workaround how to edit post content in the meantime?
Best regards

November 25, 2019 at 9:08 pm #5017071

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

This issue is happening because your database has not enabled Auto Increment for the following tables.

The following tables require Auto Increment enabled in order to function properly:

wp_icl_core_status
wp_icl_flags
wp_icl_languages
wp_icl_languages_translations
wp_icl_message_status
wp_icl_mo_files_domains
wp_icl_strings
wp_icl_string_pages
wp_icl_string_positions
wp_icl_string_status
wp_icl_string_translations
wp_icl_string_urls
wp_icl_translate
wp_icl_translate_job
wp_icl_translations
wp_icl_translation_batches
wp_icl_translation_status

I have manually enabled the Auto Increment value within your database for the above tables but I recommend reviewing your website structure as there is a chance other WordPress tables have that option disabled as well that might require it.

For example, wp_options , wp_postmeta, and wp_posts all were missing Auto Increment which was necessary in order to resolve this issue.

Please let me know your results now when you save a page/post.

Screen Shot 2019-11-25 at 12.33.01 PM.png
November 28, 2019 at 8:56 am #5034047

alexanderK-76

My issue is resolved now.
I have no idea how the auto increment information got lost from the wordpress database. I fixed all tables manually and removed some wrong saved data. Now everything seems to work fine, thank you very mouch for the help!