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.

Tagged: 

This topic contains 5 replies, has 3 voices.

Last updated by Dražen 1 year, 7 months ago.

Assisted by: Dražen.

Author Posts
August 28, 2023 at 2:37 pm #14301637

arturasJ-4

I am trying to:
Install WPML

Link to a page where the issue can be seen:
hidden link

I expected to see:
successful install

Instead, I got:
A fatal error

August 28, 2023 at 5:54 pm #14302649

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

From what I can see, there’s already an open ticket for this issue here:

https://wpml.org/forums/topic/cant-install-wpml/

This is considered a duplicate ticket.

Please do not open more tickets for the same issue as this will only load the ticket queue and will move your initial tickets lower in the queue priority.

Please wait for a response in the initially created ticket.

Can you also please mark this current ticket as resolved?

Thank you for your understanding and cooperation.

Mihai Apetrei

August 29, 2023 at 12:19 pm #14306987

arturasJ-4

This didn't help.
I can't even activate the WPML plugin, because the whole site breaks and an error is displayed:
"Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:145 the database contains post_attachment while this function was called with post_nav_menu_item in /home/zilinski/domains/zilinskis.lt/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:34 Stack trace: #0 /home/zilinski/domains/zilinskis.lt/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1529): WPML_Set_Language->set() #1 /home/zilinski/domains/zilinskis.lt/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(229): SitePress->set_element_language_details() #2 /home/zilinski/domains/zilinskis.lt/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(85): WPML_Nav_Menu->_set_menus_language() #3 /home/zilinski/domains/zilinskis.lt/public_html/wp-includes/class-wp-hook.php(310): WPML_Nav_Menu->init() #4 /home/zilinski/domains/zilinskis.lt/public_htm in /home/zilinski/domains/zilinskis.lt/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 34"

August 31, 2023 at 6:27 am #14316979

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

Seems one of your items in the database is corrupted and causing an issue with WPML, You will need to follow the next errata and delete this element. Please note issues can happen with multiple different items (ID number) so you would need to repeat the process until the error is gone.

- https://wpml.org/errata/fatal-error-invalidargumentexception-element_id-and-type-do-not-match/

Regards,
Drazen

September 1, 2023 at 1:22 pm #14326837

arturasJ-4

I have followed the steps you provided me but after deleting the row from database with element_id:145 some pages were deleted from my website too.

September 4, 2023 at 6:23 am #14333625

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

it shouldn't be caused by deleting that item, since in the error you shared it says it is post_nav_menu_item, so you could only lose a menu item in your menu.

It could be caused by something else, I suggest disabling WPML and checking if the pages are still there, or if you can recreate them if they are not too much hassle.

If you still have issues, let us know and I will open a new ticket for you so we can debug this further or you can also open a new chat and we can check it out there.

Regards,
Drazen