Skip Navigation

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

Problem: When I try to synchronize the menus, the menu is not synchronized and this error message is displayed in the debug file: Fatal error: Uncaught exception 'InvalidArgumentException' with message 'element_id and type do not match for element_id:20 the database contains tax_category while this function was called with tax_nav_menu'.

Also, how do I configure the URL to be displayed with directories?

Solution: To solve the problem of "Fatal Error" it is necessary to remove the records that are in trouble, usually in the _icl_translations table.

To use the URLs as a directory, follow the steps below:

- Click on the WPML > Languages > Language URL format - Select the "Different languages in directories" option - Click on the "Save" button.

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

Last updated by Michael Bonke 4 years, 4 months ago.

Assigned support staff: Bruno.

Author Posts
July 13, 2017 at 7:32 pm #1319168

Michael Bonke

I am trying to: translate menu to english

Link to my site: hidden link

I expected to see:

Instead, I got: when I save the menu error 500 appears. When I delete WPML plugin via ftp from my server, I can log in as adim again, but when reinstalled and activated error 500 appears immediately

Here is the debug report:
Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-includes/functions.php on line 4138 Notice: Use of undefined constant label - assumed 'label' in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-content/plugins/interactive-3d-flipbook-powered-physics-engine/inc/taxonomy.php on line 7 Fatal error: Uncaught exception 'InvalidArgumentException' with message 'element_id and type do not match for element_id:20 the database contains tax_category while this function was called with tax_nav_menu' in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:28 Stack trace: #0 /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1651): WPML_Set_Language->set('20', 'tax_nav_menu', NULL, 'de', NULL, true) #1 /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(191): SitePress->set_element_language_details('20', 'tax_nav_menu', NULL, 'de') #2 /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(78): WPML_Nav_Menu->_set_menus_language() #3 [internal function]: WPML_Nav_Menu->init('') #4 /mnt/web204/a0/71/53367 in /mnt/web204/a0/71/5336771/htdocs/WordPress_05/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 28

July 13, 2017 at 7:53 pm #1319178

Bruno

Hi,

Thank you for contacting us.

It looks like some database records have corrupted. Please, can I install a plugin called "Adminer" to check the database and fix the problem?

I'll need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help.

You will find the needed fields for this 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.

*** Note: Please make a full backup of your site.

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thank you.

July 14, 2017 at 10:16 am #1319535

Michael Bonke

Dear Bruno, did you get the private message? I do not have a testsite, sorry...

July 14, 2017 at 3:01 pm #1319805

Bruno

Thank you. Yes, I received your private message.

At the moment I've deactivated WPML so that, if you want, you can access your website.

However, as I requested above, I need to install a plugin called Adminer to check for those records that are corrupted. Please, can I install the "ARI Adminer" plugin (https://wordpress.org/plugins/ari-adminer/)?

Thank you.

July 14, 2017 at 3:20 pm #1319817

Michael Bonke

Yes, please go ahead. Thanks

July 14, 2017 at 3:55 pm #1319846

Bruno

Thank you. I fixed the problem on your site. Please, could you check if the site is working properly?

Please, let me know if I can help with any other questions you may have. I'll be happy to help.

Thank you.

July 14, 2017 at 6:14 pm #1319921

Michael Bonke

Thank you Bruno! It looks like as everything is working! Great job! Can you tell me what the problem was so I can avoid the same bug. And maybe you have a tip how I could change the URL id of the languages...? for example: hidden link should become hidden link. Is that poosible? Thank you again!!

July 14, 2017 at 6:18 pm #1319922

Bruno

Hi,

I'm glad that the problem is solved.

The problem was that three elements are corrupted. These elements were using a "tax_category" type, but the WPML are calling another type "tax_nav_menu".

To use the URLs as you want, follow the steps below:

- Click on the WPML > Languages > Language URL format
- Select the "Different languages in directories" option
- Click on the "Save" button.

Please, let me know if I can help with any other questions you may have. I'll be happy to help.

Thank you.

July 14, 2017 at 7:02 pm #1319944

Michael Bonke

THANK YOU BRUNO!!!! I'm really happy with your support! Never experienced better one!!! All the best!!