Viewing 10 replies - 1 through 10 (of 10 total)
  • Wow. Same thing happened to me today. All the translations of the menu disapeared, content of pages still ok.

    Anyone with a solution? THANKS!

    Same here! I’m quite sure it’s because of the recent WP update.

    Symptoms are:
    – Switching languages doesn’t work for the menus anymore (button title says in the same language)
    – Switching languages in sites DO still work
    – Re-creating the menu (even in the simplest menu structure for testing purposes) doesn’t do anything against the problem. So I guess that it is not caused by a bad database-entry.
    – When clicking a button which name is being displayed in language-1, but is supposed to be displayed in language-2, the correct page in the correct language (language-2) is loaded. So I guess it’s only a display-problem. The links DO work properly.

    I haven’t found any workaround yet. Help is much appreciated! Thank you!

    A temporary solution is to manually change every menu title from appearance – menus. Example [:en]Title[:es]Titulo

    interesting… same here. restored website backup from this morning and everything is back. i didn’t restore DB but couldn’t find any reference there for the english version of a menu. just spanish was there…

    I am pretty sure this came with the WP 4.5 update. If you do [:en]Title[:es]Titulo then you are fine but you need to do this each time you add navigation item which is pretty annoying. In other words when you do [:en]Title[:es]Titulo it will be ok but if you click on save again then you are loosing the entire labels. What is the cure?

    No cure yet ?? yeah so annoying, each time you change the menu you need to retype all labels

    Let’s all posted here so we can have this repaired please: https://qtranslate-x.com/support/index.php?topic=371.0

    Via https://qtranslate-x.com/support/index.php?topic=371.0

    Edit file in /wp-admin/nav-menus.php

    line 56

    //if ( isset( $_POST['nav-menu-data'] ) ) { << comment this
    //	$data = json_decode( stripslashes( $_POST['nav-menu-data'] ) ); << and this
    	if ( ! is_null( $data ) && $data ) {
    		foreach ( $data as $post_input_data ) {
    			// For input names that are arrays (e.g. <code>menu-item-db-id[3]</code>), derive the array path?keys via regex.
    			if ( preg_match( '#(.*)\[(\w+)\]#', $post_input_data->name, $matches ) ) {
    				if ( empty( $_POST[ $matches[1] ] ) ) {
    					$_POST[ $matches[1] ] = array();
    				}
    				// Cast input elements with a numeric array index to integers.
    				if ( is_numeric( $matches[2] ) ) {
    					$matches[2] = (int) $matches[2];
    				}
    				$_POST[ $matches[1] ][ $matches[2] ] = wp_slash( $post_input_data->value );
    			} else {
    				$_POST[ $post_input_data->name ] = wp_slash( $post_input_data->value );
    			}
    		}
    	//}

    << And This! for hide if

    Good luck and thank you hakangoker — Wait new ver. of qTranslate X

    Moderator Marius L. J.

    (@clorith)

    Hi,

    I just have to pop in and say, please please please please PLEASE, do not edit core files.

    This can have adverse effects on your site as it may affect your theme, other plugins and WordPress it self, and any changes you make will also be lost when you update WordPress.

    Hi Daniel, how does the code look like after editing line 56? Thank you so much

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘menu translation disappeared (urgent!)’ is closed to new replies.