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

Last updated by reinerS-3 2 months ago.

Assigned support staff: Rohan Sadanandan.

Author Posts
August 8, 2019 at 12:07 pm

reinerS-3

If I activate the plugin "WPML Multilingual CMS", i get an error message and wordpress does not work anymore!

------

Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:1647 the database contains post_attachment while this function was called with post_nav_menu_item in /homepages/26/d731514747/htdocs/saflax/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32 Stack trace: #0 /homepages/26/d731514747/htdocs/saflax/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1489): WPML_Set_Language->set('1647', 'post_nav_menu_i...', NULL, 'de', NULL, true) #1 /homepages/26/d731514747/htdocs/saflax/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(211): SitePress->set_element_language_details('1647', 'post_nav_menu_i...', NULL, 'de') #2 /homepages/26/d731514747/htdocs/saflax/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(78): WPML_Nav_Menu->_set_menus_language() #3 /homepages/26/d731514747/htdocs/saflax/wp-includes/class-wp-hook.php(286): WPML_Nav_Menu->init('') in /homepages/26/d731514747/htdocs/saflax/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 32

August 8, 2019 at 12:19 pm #4362725

Rohan Sadanandan
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for contacting WPML Support.

This kind of error is happening because of corrupt entry or misconfiguration in the Database. In this case element_type which has element_id 1647 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:1647 and delete that row

This should fix the issue.

Let me know if this helps you or if you need further assistance.

Thanks,
Rohan

August 8, 2019 at 12:50 pm #4363069

reinerS-3

hello. thanks for the quick help. we removed it from the database, but without success. i just restored backup. we did the correction in the database again without activating "WPML Multilingual CMS". if you could look there again, thank you.

August 8, 2019 at 2:19 pm #4363759

Rohan Sadanandan
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

For debugging the issue, I need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator”(https://wordpress.org/plugins/duplicator/) on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is okay for you.

Thanks,
Rohan

August 8, 2019 at 5:40 pm #4365195

reinerS-3

Its ok.

August 9, 2019 at 11:19 am #4369697

Rohan Sadanandan
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

I am not able to export your site using Duplicator.
It's showing that your server doesn't have enough storage space for saving the snapshots(Around 500MB is required).
Is it possible for you to increase the same?
If it's not possible, I'll import using Cloudways without affecting your site.
Please let me know the same.

Thanks,
Rohan

August 12, 2019 at 6:10 am #4378479

reinerS-3

our webserver still has 92GB free. the wordpress installation is about 2.8GB in size. so this should work.

August 12, 2019 at 1:21 pm #4381277

reinerS-3

if necessary, do it with cloudways. thank you.

August 12, 2019 at 2:47 pm #4381713

Rohan Sadanandan
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

I've copied the site using Duplicator & I'm checking the same.
Could you please confirm whether you are using WPML for the first time on this site?

Thanks,
Rohan

August 12, 2019 at 7:29 pm #4383377

reinerS-3

yes, I'm using wpml on the site for the first time.

August 13, 2019 at 6:22 am #4385227

Rohan Sadanandan
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

It seems that there are some corrupted entries in the database.

So if this is the first time you are using WPML & you have not created any translations, I would suggest you to delete the WPML tables from the database which can be identified with the text _icl_ followed by your WordPress table prefix.

Let me know if you need assistance in this case

Thanks,
Rohan

August 13, 2019 at 6:28 am #4385231

reinerS-3

Hello, Rohan,

this website was first built with the theme "storefront" and completely translated into 6 languages. until then everything ran perfectly. after that we installed the theme "TheGreen" and from then on WPML didn't work any more. our programmer takes another look at it now and i'll get back to you if necessary. thank you very much.

August 13, 2019 at 9:46 am #4386767

reinerS-3

if we delete these tables, our entire translation will be gone. is there another way?

August 13, 2019 at 1:54 pm #4388645

Rohan Sadanandan
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

It seems that the database got corrupted after the theme is installed.
Anyway, I will check again & let you know if I could find any solution.

Thanks,
Rohan

August 14, 2019 at 1:58 pm #4395659

Rohan Sadanandan
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

I was debugging your site today & what I found is that the issue is with the navigation menus. I deleted all the navigation menus in my copy of your site & the issue got fixed. So what I suspect is that the error is coming from one of the Footer menus.

I would suggest that you can try deleting the menu one by one until the issue is fixed(The menu id is showing in the error message). Once the issue is fixed, you can re-create the navigation menus. You should take a complete backup of your site before doing this operation. Also, it's better if you could create a staging or demo site & perform the actions there first.

Let me know how it goes.

Thanks,
Rohan