Skip Navigation

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

Problem:
I get the following error message in the backend:

PHP Fatal error:  Uncaught exception 'InvalidArgumentException' with message 'element_id and type do not match for element_id:116789 the database contains post_post while this function was called with post_tribe_events' in /wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:28

Solution:
Please do the following:
1. Go to WPML->Support.
2. Scroll down to the bottom and click the "troubleshooting" link.
3. In the "Clean up" section find the "Fix post type assignment for translations" button. Click it.
4. Find the "Clear the cache in WPML" button. Click it.
5. Find the "Remove ghost entries from the translation tables" button. Click it.
6. Find the "Fix element_type collation" button. Click it.

If that doesn't help, please report the issue on the support forum. Before creating the new ticket, please enable error logging. You can find more info on how to do it and example code for debugging at https://codex.wordpress.org/Debugging_in_WordPress#Example_wp-config.php_for_Debugging
In brief:
1. Log into your FTP.
2. Edit the wp-config.php file.
3. Add the following code:

 // Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable displaying errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

4. Save the file.
5. Repeat the actions that lead to the 500 error.
6. Go back to your FTP.
7. In the wp-content folder, you should find the debug.log file where all errors should be added.

Paste the contents of the debug.log file in the forum ticket if there are any errors listed.

Relevant Documentation:
https://wpml.org/documentation/support/debugging-wpml/

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

Last updated by Kaloyan 3 years, 11 months ago.

Assigned support staff: Joanna.

Author Posts
November 7, 2016 at 11:20 am #1131339

Kaloyan

I am trying to: Navigate in admin Plugin page
URL of (my) website where problem appears:
hidden link
I expected to see:
List of plugins
Instead, I got:
500 internal server error
Steps to duplicate the issue: just navigate around the backedn

Here is the debug.log info:

[07-Nov-2016 10:54:58 UTC] PHP Fatal error:  Uncaught exception 'InvalidArgumentException' with message 'element_id and type do not match for element_id:116789 the database contains post_post while this function was called with post_tribe_events' in /usr/www/users/abcmaj/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:28
Stack trace:
#0 /usr/www/users/abcmaj/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1640): WPML_Set_Language->set('116789', 'post_tribe_even...', false, 'en', NULL, true)
#1 /usr/www/users/abcmaj/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(4170): SitePress->set_element_language_details('116789', 'post_tribe_even...', false, 'en')
#2 /usr/www/users/abcmaj/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-tm-settings-update.php(61): SitePress->verify_post_translations('tribe_events')
#3 /usr/www/users/abcmaj/wp-content/plugins/sitepress-multilingual-cms/classes/settings/class-wpml-tm-settings-update.php(76): WPML_TM_Se in /usr/www/users/abcmaj/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 28

Please help me understand who today out of a sudden this appeared, no updates, no website move, just creating posts and the error appeared.

Regards

November 7, 2016 at 2:12 pm #1131506

Joanna

Hello Mariana,

Please do the following:
1. Go to WPML->Support.
2. Scroll down to the bottom and click the "troubleshooting" link.
3. In the "Clean up" section find the "Fix post type assignment for translations" button. Click it.
4. Find the "Clear the cache in WPML" button. Click it.
5. Find the "Remove ghost entries from the translation tables" button. Click it.
6. Find the "Fix element_type collation" button. Click it.

If that doesn't help, please tell me if you were creating a native WordPress posts or some custom ones?
If it's okay with you, I’d also like to replicate your website locally. This will help me debug the issue and find the solution. For this, I'll need a snapshot of your site which you can create using a plugin called "Duplicator". This will allow me to create a copy of your site and your content.

If you already know how Duplicator works (http://wordpress.org/plugins/duplicator/), please send me the installer file and the zipped package you downloaded.

Here's a great tutorial on how to use it: hidden link.

Please send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big). Your next reply will be private, which means that only you and I will be able to see it and have access to it. You can paste the links to the files there. You can also install the Duplicator plugin, create a snapshot and share the credentials to your website. I will then download the files from the admin panel.

Once the problem is resolved I will delete the local site.