Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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.

Author Posts
May 18, 2016 at 7:03 am #884734

Janatan Snippert

I am trying to:
save a post, a taxonomy, a menu, everything....
nothing saved, nothing translated, any save operation results will be records in database with zero id and lots of error in log file.

i'also created a thread before and not solved the issue,
https://wpml.org/forums/topic/category-translation-and-menu-synchronization-problem/

WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO `wp_icl_translations` (`element_type`, `language_code`, `source_language_code`, `trid`) VALUES ('tax_portfolio_category', 'en', 'fa', '912') made by do_action('wp_ajax_wpml_save_term'), call_user_func_array, WPML_Post_Edit_Ajax::wpml_save_term, WPML_Terms_Translations::create_new_term, WPML_Update_Term_Action->execute, wp_insert_term, do_action('create_term'), call_user_func_array, WPML_Update_Term_Action->add_term_language_action, SitePress->set_element_language_details, WPML_Set_Language->set, WPML_Set_Language->insert_new_row
PHP Notice:  Trying to get property of non-object in D:\projects\svn\woodas\site2\wp-content\plugins\sitepress-multilingual-cms\inc\wpml-post-edit-ajax.class.php on line 46
PHP Stack trace:
PHP   1. {main}() D:\projects\svn\woodas\site2\wp-admin\admin-ajax.php:0
PHP   2. do_action() D:\projects\svn\woodas\site2\wp-admin\admin-ajax.php:89
PHP   3. call_user_func_array:{D:\projects\svn\woodas\site2\wp-includes\plugin.php:525}() D:\projects\svn\woodas\site2\wp-includes\plugin.php:525
PHP   4. WPML_Post_Edit_Ajax::wpml_save_term() D:\projects\svn\woodas\site2\wp-includes\plugin.php:525
PHP Notice:  Trying to get property of non-object in D:\projects\svn\woodas\site2\wp-content\plugins\sitepress-multilingual-cms\inc\wpml-post-edit-ajax.class.php on line 47
PHP Stack trace:
PHP   1. {main}() D:\projects\svn\woodas\site2\wp-admin\admin-ajax.php:0
PHP   2. do_action() D:\projects\svn\woodas\site2\wp-admin\admin-ajax.php:89
PHP   3. call_user_func_array:{D:\projects\svn\woodas\site2\wp-includes\plugin.php:525}() D:\projects\svn\woodas\site2\wp-includes\plugin.php:525
PHP   4. WPML_Post_Edit_Ajax::wpml_save_term() D:\projects\svn\woodas\site2\wp-includes\plugin.php:525

i did all fixes in support panel of WPML, deleted all zero id records from database, everything seems normal, i also did some debugging on WordPress and this issue but no success.

May 18, 2016 at 9:39 am #884920

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello.

I would like to take a look at the database contents which relate to the message you are receiving.

1. Adminer plugin
Please install and activate the Adminer plugin.

2.Temporary Access to your system
Could you please provide access to your system (wp-admin and ftp) so that I can further investigate this particular problem? The fields to provide this data are included in a private section that I will open for your next response. You can find it above the comments area. The information in this private section is only visible between WPML Support and you.

3. Diagnostic
Please confirm that this error/message is also occurring if you temporarily deactiavte the non-WPML plugins as well as change your active theme to Twenty Fourteen.

Thanks for executing all the above steps.

May 18, 2016 at 2:27 pm #885256

Janatan Snippert

I don't know why! but after checking many things (a week) i realized that all of the tables in database has no primary key and auto increment attribute!

i checked backup and restore procedures and previous backups , and all of them are good.

by comparing database schema with a new installation of WordPress 4.5.2 and WPML plugins, i fixed the database tables issue, and everything works fine.

bu still a big question to me why such an issue happens to the database!!! any idea?

May 18, 2016 at 9:52 pm #885605

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

I´m afraid not =(. But I´m glad you were able to discover the cause and resolve the issue!