Viewing 15 replies - 1 through 15 (of 20 total)
  • What happens when you switch the theme? Are you using the theme Kallyas?

    Thread Starter ghufran younis

    (@ghufran-younis)

    thanks for replying
    when i switched the theme to twenty fifteen the editor reappeared
    i’m using a theme called jawesome portfolio , would there be a problem if i activated twenty fifteen then wrote all my translation then switched back to jawesome theme , will this affect the front end of my website? thanks

    You can do that, MLP will still work, and your translations will work too. But I guess the theme developer is loading some broken stylesheets into the editor page. You should tell her/him about this.

    In the mean time, please try this plugin: https://marketpress.com/wp-content/uploads/2015/01/mlp-force-metabox-visibility.zip

    It might fix the issue. Please let me know if there are still problems.

    Thread Starter ghufran younis

    (@ghufran-younis)

    thank you very much the plugin you recommended works fine

    Thread Starter ghufran younis

    (@ghufran-younis)

    sorry when i last posted i didn’t check all the features of the plugin ,and now that i have i can see that there something wrong with it, it doesn’t show the relationship button or the taxonomy button and the css is all messed up
    sorry to bother you again

    Please contact the theme author. It is close impossible to fix their errors on our side. Let them fix the theme would be much more efficient.

    Do you have a link to the theme page?

    Thread Starter ghufran younis

    (@ghufran-younis)

    ok thank you for your help and here is the link to the theme

    Hello,

    I’m developer of JaWesome theme. I’ve repaired the problem in single post editor. But i cannot see any problem in taxonomy editor. Can you send us some screenshots?

    Please make a request at jaw[at]jawtemplates.com with your licence code, we’ll send the new version to you.

    If you have some more issues, please feel free to contact us. We’ll be glad to help you.

    I have a similar problem. For a user, the translation box does not show, neither in Screen options, and below the post tinyMCE.

    I tried your plugin mlp-force-metabox-visibility but it still does not show.

    My website is multisite and all users are Administrator role with the default Administrator capabilities.
    The problematic user has been created a few days after the installation of MultilingualPress.
    Enabling the MULTILINGUALPRESS_DEBUG constant of the plugin does not show anything in the error_log file.
    I’ve tried to look into the file Mlp_Translation_Metabox in the hope I could find something obvious, but couldn’t.
    MultilingualPress is latest version, theme is hueman, wordpress is 4.3.

    Thanks for any help !

    Plugin Author Frank Bueltge

    (@bueltge)

    Can you check this without additional plugins, only with a active MLP plugin and the Multisite install? It is necessary, that no other plugin hook inside the views, the additional meta boxes. We add the meta box about the default way and if the capability is on the role.

    I tried to network-deactivate the plugins except multilingualpress but still no luck. I tried to change the user role to something else then back to administrator, and that does not change. I’ll try to find what’s wrong.

    I added some tracing text.

    Normal administrators get :

    Gab-MultilingualPress: enter register_meta_boxes
    Gab-MultilingualPress: current_user_can_for_blog publish true
    Gab-MultilingualPress: register_metabox_per_language 1
    Gab-MultilingualPress: exit register_meta_boxes

    But this administrator get :

    Gab-MultilingualPress: enter register_meta_boxes
    Gab-MultilingualPress: current_user_can_for_blog publish
    Gab-MultilingualPress: 1 is not translatable
    Gab-MultilingualPress: exit register_meta_boxes

    So, current_user_can_for_blog returns nothing (not false) in the following line:
    return current_user_can_for_blog( $blog_id, 'publish' );
    of file: Mlp_Translation_Metabox.php

    That’s really weird.

    Has the user account in question been added to more than on site in the network? Being an admin on one site isn’t worth anything for other sites—especially when the user hasn’t even been added to other sites.

    I will have a look at current_user_can_for_blog returning NULL, though. I suppose, this is a core bug, which I will report once confirmed.

    Could you show me how your debugging code looks like exactly?

    Just for your information, I couldn’t come up with a way to return something other than a boolean TRUE or FALSE. Most probably, there is something wrong at your end.

    The user is administrator on all the sites.

    As for my debugging code, you will find it below:

    public function register_meta_boxes( $post_type, WP_Post $post ) {
    
    		echo "Gab-MultilingualPress: enter register_meta_boxes\n";
    
    		if ( ! in_array( $post_type, $this->allowed_post_types ) ) {
    		  echo  "Gab-MultilingualPress: post is not in allowed_post_types\n";
    			return;
    		}
    
    		$current_blog_id = get_current_blog_id();
    		$site_relations = $this->plugin_data->get( 'site_relations' );
    		$related_blogs = $site_relations->get_related_sites( $current_blog_id, FALSE );
    
    		if ( empty( $related_blogs ) ) {
    		  echo "Gab-MultilingualPress: empty related_blogs\n";
    			return;
    		}
    
    		foreach ( $related_blogs as $blog_id ) {
    			// Do not allow translations if the user is lacking capabilities for the remote blog
    			if ( ! $this->is_translatable_by_user( $post, $blog_id ) ) {
    			  echo "Gab-MultilingualPress: $blog_id is not translatable\n";
    				continue;
    			}
    
    			if ( $current_blog_id !== (int) $blog_id ) {
    				$this->register_metabox_per_language( $blog_id, $post );
    				echo "Gab-MultilingualPress: register_metabox_per_language $blog_id\n";
    			}
    			else
    			{
    				echo "Gab-MultilingualPress: current_blog_id == $blog_id\n";
    			}
    		}
    
    		$assets = $this->plugin_data->get( 'assets' );
    		$assets->provide( array( 'mlp_admin_js', 'mlp_admin_css' ) );
    
    		echo "Gab-MultilingualPress: exit register_meta_boxes\n";
    	}
    
    	/**
    	 * Check if the current user has the appropriate capabilities to edit the given post.
    	 *
    	 * @param WP_Post $post
    	 * @param int     $blog_id
    	 *
    	 * @return bool
    	 */
    	private function is_translatable_by_user( WP_Post $post, $blog_id ) {
    
    		$blog_id = absint( $blog_id );
    
    		$remote_post = $this->data->get_remote_post( $post, $blog_id );
    		if ( isset( $remote_post->dummy ) && $remote_post->dummy === TRUE ) {
    		  echo "Gab-MultilingualPress: current_user_can_for_blog publish" . current_user_can_for_blog( $blog_id, 'publish' ) . "\n";
    			return current_user_can_for_blog( $blog_id, 'publish' );
    		}
    
    		echo "Gab-MultilingualPress: current_user_can_for_blog edit_post" . current_user_can_for_blog( $blog_id, 'edit_post', $remote_post->ID ) . "\n";
    		return current_user_can_for_blog( $blog_id, 'edit_post', $remote_post->ID );
    	}

    That was just simple debugging, I haven’t made it very beautiful ??

    And I think current_user_can_for_blog returns an empty array, not NULL.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘translation meta box not showing’ is closed to new replies.