Salta la navigazione

Questo è il forum di assistenza tecnica di WPML, il plug-in multilingue di WordPress.

La sua lettura è permessa a tutti, ma la pubblicazione è riservata esclusivamente ai clienti di WPML. Il team di WPML risponde sul forum 6 giorni su 7, 22 ore su 24.

Nessun supporter è disponibile a lavorare oggi sul forum Italian. Sentitevi liberi di creare ticket e li gestiremo il prima possibile quando saremo online. Grazie per la comprensione.

Etichettato: 

Questo ticket contiene 12 risposte, ha 2 voci.

Ultimo aggiornamento da Prosenjit Barman 6 mesi, 3 settimane fa.

Assistito da: Prosenjit Barman.

Autore Messaggi
Settembre 29, 2023 a 7:41 am #14486065

lucaT-17

Hello,
I've found a issue when I try to translate menu.
When I click to Translate in english and then I add the pages to the menu it freeze and when I update the page it show the error in the picture. How could I fix it? I can't report issue log because after the issue I can't have access to wordpress

WhatsApp Image 2023-09-29 at 09.31.48.jpeg
Settembre 29, 2023 a 8:14 am #14486383

lucaT-17

Update: I followed these instructions https://wpml.org/errata/fatal-error-invalidargumentexception-element_id-and-type-do-not-match/
and now I can access again to wordpress backend. But the issue about the menu translation is still here.
Please let me know how I can fix it.

Thank you

Ottobre 2, 2023 a 5:35 am #14494303

Prosenjit Barman
Supporter

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support. Sorry for the delay in responding due to the weekend.

As we are experiencing a high volume of tickets in the Italian support forum, I took this ticket and responded in English. I hope it is fine for you.

Glad to see that you've solved one of the issues by following the instructions in Errata. Now, the issue you're having while saving the menu might be happening due to a conflict between WPML and another plugin or the theme on your site. I kindly request you to try running a conflict test on your site. Please follow the steps mentioned below.

- Make sure to take a full backup of the site.
- Switch to a default theme like "twenty twenty-one" and try to save the menu. If that solves the issue, that will mean that something from the Theme is interrupting the saving process. In that case, you need to check the code or consult with the theme developer regarding this matter.
- If the issue persists even after switching to a theme, please go to the "Plugins > All Plugins" section and disable other plugins except for WPML and its addons. try to save the menu again.
- If that solves the issue, start activating the plugins and after activating each, check if you can save the menu.
- In this way, you'll be able to pinpoint the plugin that is causing the issue.

I hope the conflict test will help. But, feel free to reach out if you need further assistance. I will be happy to help.

Best regards,
Prosenjit

Ottobre 2, 2023 a 9:16 am #14496289

lucaT-17

Hello, thank you for your advises, I tried to switch current theme to "twenty twenty-one" but "menu" disappear under "Appearance". I noticed that the current menu in english is correct for the pages links but it is wrong for the categories, that remain in italian language. Is there a different way to change the categories link in english menu since I can't change manually on english menu?
I tried to disable all the plugins but the issue is still there. And I tried also to synchronize menus languages, and the site can't complete the operation.

Ottobre 3, 2023 a 7:15 am #14501615

lucaT-17

Hello, could you help me to fix this issue? I tried again to syncronize menus but it shows me issue again. thank you

Ottobre 3, 2023 a 7:34 am #14501867

lucaT-17

I tried also to create a new english menu but when I try to add pages or categories to it, doesn't work and if I refresh page this is the issue:

Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:20190 the database contains post_attachment while this function was called with post_nav_menu_item in /home/customer/www/rossellam6.sg-host.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:34 Stack trace: #0 /home/customer/www/rossellam6.sg-host.com/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1529): WPML_Set_Language->set('20190', 'post_nav_menu_i...', NULL, 'it', NULL, true) #1 /home/customer/www/rossellam6.sg-host.com/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(229): SitePress->set_element_language_details('20190', 'post_nav_menu_i...', NULL, 'it') #2 /home/customer/www/rossellam6.sg-host.com/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/customer/www/rossellam6.sg-ho in /home/customer/www/rossellam6.sg-host.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 34

Ottobre 3, 2023 a 9:06 am #14502739

Prosenjit Barman
Supporter

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for providing more information regarding the issue.

I checked the English version of the Menu and understood the issue. Instead of adding the category link as a custom link in the menu, please select the category from the sidebar of the menu section and add it directly to the menu. Please check this screenshot for a better understanding: link nascosto

In this way, depending on the availability of translation, the category link will be updated automatically in other languages. Please give it a try and I hope it will help.

If you've encountered the "element_id" error again, please delete that corrupted element by following the instructions in this errata: https://wpml.org/errata/fatal-error-invalidargumentexception-element_id-and-type-do-not-match/

Please note that you might need to repeat the same steps for other elements with corrupted element_id as well.

Please let me know if that helps or if you need further assistance in this matter. I will be happy to help.

Best Regards,
Prosenjit

Ottobre 3, 2023 a 9:36 am #14502949

lucaT-17

Hi,

Thanks for the reply, I have already done this test, but it keeps crashing, can you give me assistance in the backend?

Thanks

Ottobre 3, 2023 a 9:40 am #14502957

lucaT-17

This is my backend for menu in italian. It is correct.

menu ita.png
Ottobre 3, 2023 a 9:43 am #14502993

lucaT-17

But this is the situation when I switch to english translation. And I can't add no pages. It seems like the english menu is not available to edit.

menu eng.png
Ottobre 3, 2023 a 10:59 am #14503637

lucaT-17

If I try to add pages to italian menu, site crashes.

Ottobre 4, 2023 a 4:16 am #14509339

Prosenjit Barman
Supporter

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for sharing more information.

You'll be able to add items to the English menu right after creating the Menu. After switching to the English language, give the English menu a name and click on the "Crea Menu" button. Once the menu is created, you'll be able to add English menu items.

Since the site crashes whenever you try to add a new page to the Italian, a closer inspection will be required to understand the root cause. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" 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 ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
link nascosto

Looking forward to your response.

Best Regards,
Prosenjit

Ottobre 5, 2023 a 3:14 am #14516173

Prosenjit Barman
Supporter

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for sharing the access information.

By following the instructions outlined here[ https://wpml.org/errata/fatal-error-invalidargumentexception-element_id-and-type-do-not-match/ ] I have successfully been able to solve the Fatal error. You will not encounter any issues while adding items to the Italian menu.

Now, if you want to translate the menu manually, please follow the instructions mentioned in the guide below.

- https://wpml.org/documentation/getting-started-guide/translating-menus/#option-2-translating-menus-manually

I hope it helps. If you need further assistance or there is anything else you need help, feel free to let me know. I will be glad to help.

Best regards,
Prosenjit

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.