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

Last updated by Andreas W. 5 months, 1 week ago.

Assigned support staff: Andreas W..

Author Posts
April 26, 2019 at 12:48 pm #3690743

Marvin

I am trying to:
Make the english menu work on the english version of the site.

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

Instead, I got:
The dutch menu works on the english site and there issn't even a button to translate it to English anymore. I've troubbleshoot and reset the cache and fix term count. Cleared the database by hand, nothing works. The WP menu sync doens't work. Can't seem to fix this problem.

I had like 20 menu's named "optional" in the system. Think that breaked the website, but don't know where they came from.

This is a live site, how can i fix this?
I've read like 20 topics about this problem but your forum never gives an awnser.. thats always left out for some reason 🙁

April 26, 2019 at 10:31 pm #3693513

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for contacting the WPML Support.

Did the issue appear after a late update or after adding a new plugin?

Could you please try to run the site in minimal setup to see if the issue persists?

Please disable any additional plugin that is not related to WPML and its add-ons. If the issue disappears please start reactivating any plugins, or activate them in small groups. This way please verify at which points the issue appears again to indicate the plugin that is causing the issue.

Also please change to a default theme like TwentySeventeen to see if the issue might be theme related.

Further, you could enable the wp-debug feature to see if there are any current PHP errors given.
More information about how to activate this feature you can find here:
https://wpml.org/documentation/support/debugging-wpml/

Also, please go to Appearance -> Menus and make sure that currently set menu is proper translated. Then verify at your "Pages" if all the pages are translated proper as well, as menu items will only be available if a translation exists.

I can see that on your home page the language switcher does not give any option to change the language. This usually must be caused to the act that the hope page is not proper translated.

Please let me know about the outcome of the investigation to be able to assist you further.

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us:
http://wpml.org/faq/provide-debug-information-faster-support/

Could you please check if you are using the latest updates for WPML and its add-ons to the latest version. Please go to PLugins -> Add new -> Commercial and click "Check for updates". then proceed with the updates.
Before doing it, please create a reliable backup of your site.

Kind regards
Andreas

May 1, 2019 at 8:42 am #3717037

Marvin

Thanks for your awnser.

I don't know when this issue appeard. Just wanted to set the English version of the site online and the menu didn't work. I disabled english again thats why the language switcher doesnt work. (and yes I enabled english before editing the menu)

The menus seem to work good in the "twenty nineteen" theme. With all the plugins enabled.

What am I doing wrong?
I've looked in the twenty nineteen theme if they load the menus different then me but thats the same.

------------------------------------------------

function register_my_menu() {
register_nav_menus(
array(
'mainmenu-menu' => __( 'Header Mainmenu' ),
'submenu-menu' => __( 'Header SubMenu' ),
'footer-menu' => __( 'Footer Menu' )
)
);
}
add_action( 'init', 'register_my_menu' );

wp_nav_menu( array( 'container'=> false, 'theme_location' => 'submenu-menu' ) );

------------------------------------------------

I'm using custom post types but without taxonomies so that couldn't be the problem.
I'm lost...

May 2, 2019 at 4:16 pm #3726701

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please increase your Memory Limit and WP Memory limit to 256M? 128M is the minimum required by WPML.
Your current values are:

MemoryLimit 256M
WP Memory Limit 64M
Add this code to your wp-config.php to increase WP memory:

/* Memory Limit /
define('WP_MEMORY_LIMIT', '256M');

Paste it just before:

/ That's all, stop editing! Happy blogging. /

These settings can be limited directly by your hosting provider, so I recommend you to contact and ask them to modify them directly.
If you can get even higher values It would be great.

https://wpml.org/home/minimum-requirements/
Note: WPML needs a minimum WP Memory limit of 128M to work only under a minimal environment, it means,
with a default theme and not other plugins installed.

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 a testing site where the issue is replicated.

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.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “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 ok with you.

IMPORTANT

Please make a backup of 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:
hidden link

Kind regards
Andreas

May 3, 2019 at 4:19 pm #3736695

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hell,

I have logged into your site and the additional languages are currently hidden.

In order to not affect your live site I was going to install the Duplicator Plugin to obtain a copy of your site for debugging but I realized that the Plugin sections does not provide the capability in order to install any plugins.

I asked you earlier to run the site on minimal setup and you replied this:
"The menus seem to work good in the "twenty nineteen" theme. With all the plugins enabled."

In this case the issue is most likely caused be the theme.

Did you take any custom coding on one of the themes template files?

Please install the Label - TeamCreative Theme on the following test site for further debugging:

One Click Login: hidden link

Leave me a short notificatiomn here once the theme is ready for testing.

Kind regards
Andreas

May 4, 2019 at 6:06 pm #3740889

Marvin

Dont know if my last reply came through....

- Did you take any custom coding on one of the themes template files?

I've developed this theme from scratch so all the code is custom. Thats why I don't understand whats going wrong. I suspect that the custom post types are breaking the menu translation because there both just term/taxonomies.

I've installed the label theme to your website but I'm affraid that it will give a 500 error. It depents on a WordPress Network site and it will try to get some information from blog ID 1 (with switch_to_blog()).

If all fails then I can install the duplicator plugin and make an export for you. But that will be of all the 10 websites that are in this multi network site in order to work.

Thank you for your help!

May 6, 2019 at 4:21 pm #3751111

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please have alook at the test site:

hidden link

I have created a simple menu using a default theme and then switched to your theme. After that I synced the theme again at WP Menus Sync and I did not recognize any issues.

Anyhow, the debug.log shows the following error:

wp_enqueue_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 <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /var/www/public/bemused-xenomorph/wp-includes/functions.php on line 4667

I hope this will help you to solve the issue.

Kind regards
Andreas

May 7, 2019 at 11:23 am #3757021

Marvin

Hello Andreas,

I'm looking at the test site but I can't see any menu on the front-end.
The backend works also "fine" on the label.normecfoodcare.com site, its the front-end that doesn't work correctly.

Thanks for reporting this error, I will lookin to that.
I think its the "wp_enqueue_script('jquery');" line 45. This is needed for gravity forms that gives an error without it.

I will try to remove this part to see if the menu's work beter but I think this wouldn't change a think.

May 7, 2019 at 2:50 pm #3759427

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hallo,

Entschuldigen Sie bitte, in der Tat war es mir nicht aufgefallen, dass auf dem Front End kein Menu angezeigt wird, allerdings ist dies auch der Fall, wenn WPML deaktiviert ist.

Haben Sie die folgende Funktion in der functions.php des Themes integriert?

function register_my_menu() {
register_nav_menu('header-menu',__( 'Header Menu' ));
}
add_action( 'init', 'register_my_menu' );

Additional you will need to put the following into the header.php file:

<?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>

Mehr Information zum Theme hier:
https://codex.wordpress.org/Navigation_Menus

Da diese Anfrage unsere Support-Richtlinien hinausgeht, würde ich Sie bitten einen unabhängigen Programmierer zu kontaktieren.

Nähere Informationen dazu hier:
https://wpml.org/de/purchase/support-richtlinie/

https://wpml.org/contractors/

Kind regards
Andreas

May 7, 2019 at 3:13 pm #3759621

Marvin

Hello Andreas,

Sorry I'm not German but like I posted above this is my menu code:

///// functions.php

function register_my_menu() {
register_nav_menus(
array(
'mainmenu-menu' => __( 'Header Mainmenu' ),
'submenu-menu' => __( 'Header SubMenu' ),
'footer-menu' => __( 'Footer Menu' )
)
);
}
add_action( 'init', 'register_my_menu' );

///// header.php

wp_nav_menu( array( 'container'=> false, 'theme_location' => 'submenu-menu' ) );

And I am a programmer, I just want to know why the website is showing a English menu on the Dutch website. And how I fix this.

This is a BUG. Not a support request. Thanks.

May 7, 2019 at 4:33 pm #3760529

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I have connected myself to your live site again and I can see that omn the Dutch Hompage there seems to be a not any issue about the menu. I am not able to verify this for the other pages in their repective language as the translations are not completed to 100%. Unless these translation are completed I am not able to verify if the menus are working as expected.

Please complete the translations and send me a short notification.

Kind regards
Andreas

May 7, 2019 at 6:17 pm #3761089

Marvin

Hello,

I think you don't understand the problem.

The menu is translated and the english version (second language) website is ready to go online. The customer filled everything and is fine with the result.

Only the menu doesn't work like it suppose to work and it did before..
I made a screenshot from the software and the site to show you what the problem is.

Dutch website backend:
- 4 menu items on "Hoofdmenu NL"

Dutch website frontend:
- 4 menu items --- perfect

English website backend:
- 1 menu item translation of "Hoofdmenu NL"

English website frontend:
- 4 menu items from the Dutch menu

How can I fix this?
Tried everything, and the "WP menu sync" doesn't help at all.
Tried unhidding the english language. no succes

May 7, 2019 at 7:36 pm #3761627

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The menus will always need to be created individually for each language at Appearance -> Menus, but in order to do this all the pages, posts, categories and so on will need to have a completed translation. Otherwise, they will not be available for selection.

Now, sadly I am not able to follow your request, as the provided screenshots seem to be from a different site or state of this site. On the site for which I received credentials the menus appears as shown on the screenshot and they are working as expected.

Could you please provide access for the site from which you took the screenshots in your last message? label.normecfoodcare.com

I do not see any bug here so far, you will only need to make sure that all elements for each language that are going to be used as menu item are translated to 100%. I would advise zou to use our Classic Translation Editor for this task. It can be enabled at WPML -> Settings -> How to translate posts and pages.

Kind regards
Andreas

May 7, 2019 at 8:41 pm #3761843

Marvin

Hello Andreas,

Your working in the wrong website! Its a multi network website.
PLEASE do not change anything on normecfoodcare.com!!!!

Please change the website your editing as shown in this new screenshot.
The admin panel is in hidden link NOT hidden link.

This is the reason the menu work "fine" when you test it is because your working on the wrong website. The screenshot I've send earlier is from label.normecfoodcare.com.

Hope you'll see the problem now.

May 8, 2019 at 3:59 pm #3768855

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I am sorry for the misunderstanding, but I was using the link provided whene we requested credentials.

No worries, I did not take any changes on:
hidden link

Now I visited:
hidden link

I got to inform you that this is a custom work request which is not covered by our support policies. Further, I am not able to debug the site as I do not have access to adding and deactivating themes and plugins, the theme editor and more.

I would suggest you to run the wp debug feature:
https://codex.wordpress.org/WP_DEBUG

This way you will receive a debug.log file for further debugging and in order to contact an independent contractor for further assistance.

Relative documentations:
https://wpml.org/purchase/support-policy/

https://wpml.org/documentation/support/debugging-wpml/

https://wpml.org/contractors/

Kind regards
Andreas

The topic ‘[Closed] Can't make menu's for specific languages.’ is closed to new replies.