This thread is resolved. Here is a description of the problem and solution.
Problem: Fatal error: Uncaught exception 'InvalidArgumentException' with message 'element_id and type do not match for element_id
Solution: This kind of error is happening because of corrupt entry or misconfiguration in the Database. In this case element_type which has element_id 83296 of wp_icl_translations database table doesn't match tax_category of this entry in wp_posts database table.
Please try the following steps after a full site backup to fix the issue.
1) Go to your database using phpMyAdmin(or something similar)
2) Go to wp_icl_translations database table
3) Find entry with element_id:83296 and delete that row
Relevant Documentation: https://wpml.org/forums/topic/wpml-is-throwing-an-fatal-error/#post-1372939
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 is split from https://wpml.org/forums/topic/all-footer-entries-of-tagdiv-newspaper-not-getting-displayed-not-translating/
Tagged: String Translation
Related documentation:
This topic contains 8 replies, has 2 voices.
Last updated by cooldeep 1 year, 5 months ago.
Assigned support staff: Bigul.
Author | Posts |
---|---|
August 5, 2019 at 6:19 am #4338097 | |
cooldeep |
The WPML>>Settings, WPML>>Settings>>Custom XML Configuration and WPML>>Translation Management pages are VISIBLE for me. I logged in with the login credentials provided to you, and I too experienced the issues as you. Strange why this issue is happening!!! I can share with you my logins, please enable private mode! https://wpml.org/wp-content/uploads/2019/08/4321729-2019_08_01_1750_001.png https://wpml.org/wp-content/uploads/2019/08/4321729-2019_08_01_1750.png https://wpml.org/wp-content/uploads/2019/08/4321729-2019_08_01_1751.png Thanks! |
August 5, 2019 at 7:07 am #4338383 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, Welcome to the WPML support forum. I will do my best to help you to resolve these issues. This may be a compatibility issue and requires further checking. Please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server. -- Bigul |
August 5, 2019 at 3:42 pm #4341719 | |
cooldeep |
Hi Bigul, Thank you for your continued support. Yes please go ahead with Duplicator. Just make sure to ignore the 'uploads;' folder as it contains lots of media files, and it will make your migration file unnecessarily large. Anyway, you are troubleshooting in the backend, so those files shouldn't be of requirement to you. Thanks! |
August 6, 2019 at 7:48 am #4344765 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, Thank you for the updates and permission. Normally we will create the Duplicator package without of *wp-content/uploads* directory. I made a Duplicator copy of the site now. Will debug it further and get back to you soon. Please wait. -- Bigul |
August 9, 2019 at 5:25 pm #4372187 | |
cooldeep |
Hi Bigul, I have been trying your solution, and other solutions since the past two days, but the error still hasn't got fixed. Like you said, I disabled all the plugins, enabled 2017 theme, and in a batch of 4-5 enabled the plguins. But whenever I enable the sitepress-multilingual-cms plugin, the site crashes, and I get the error message 'This site is experiencing technical difficulties.....' Please check attached screenshot to view the error in detail. I then disabled all the plugins/themes, enabled 2017 plugin, and the 1st plugin I tried to enable was the 'sitepress-multilingual-cms', and again I faced the same error. The only way to make the site working was to rename the 'sitepress-multilingual-cms' folder. |
August 12, 2019 at 6:34 am #4378539 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, Thank you for the updates. Please share with me the WordPress debug.log (not WPML debug information) for tracking the issue. Please check this page for instructions https://wpml.org/documentation/support/debugging-wpml/ To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to: // Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); // Disable display of 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 ); In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check you are getting any errors or warning related to WPML in the log file. If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion). -- Bigul |
August 12, 2019 at 10:47 pm #4383875 | |
cooldeep |
Hi Bigul, I finally found the cause of this error. It was because of this plugin: https://wordpress.org/plugins/disable-admin-notices/ This time what I did was, I disabled all the plugins except WPML plugins, and began re-enabling them in a batch of 4-5. And that's how I found this plugin to be the culprit. I've uninstalled/delete the plugin, and the issue is gone! I skimmed through the log, and noticed this, error. Pasting it here it'self as it's not that long. "[01-Aug-2019 14:49:16 UTC] PHP Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:83296 the database contains post_attachment while this function was called with post_nav_menu_item in /public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32 Do I use this solution of yours, https://wpml.org/forums/topic/wpml-is-throwing-an-fatal-error/#post-1372939? & here's the pastebin link to my log: https://pastebin.com/LCqVpCr0 Thanks! |
August 13, 2019 at 1:28 pm #4388493 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, Thank you for the updates. Please try the solution recommend in the following thread after a full site backup and make sure you are still having the issues or not. https://wpml.org/forums/topic/wpml-is-throwing-an-fatal-error/#post-1372939 -- Bigul |
August 16, 2019 at 1:03 am #4403871 | |
cooldeep |
My issue is resolved now. Thank you! |