Support » Plugin: Glossary » Incompatibilty between this plugin, Yoast and WPBakery page builder

Viewing 13 replies - 1 through 13 (of 13 total)
  • HI,
    this problem is happening in the term pages or in all the pages?
    this is happening inside the content?
    Are you sure that the problem is in this file?

    Thread Starter Aurélien Joahny

    (@ajoah)

    Hi,

    It is happening in all pages which have a yoast meta description empty. I tested on pages, but i think all post types are concerned.

    The content is ok.

    When I comment the line “add_filter…” in the file, the meta tag is deleted in the page (normal behaviour because it is empty)

    You are right this code doesn’t let the execution of shortcodes.
    The next version that I am releasing now will include a fix for this problem.

    Thread Starter Aurélien Joahny

    (@ajoah)

    Perfect, thank you 🙂

    New version released 🙂

    Thread Starter Aurélien Joahny

    (@ajoah)

    Hi Daniele,

    The new version remove the shortcodes. Cool but I have one more question :

    Why do you override the behaviour of Yoast when meta description is empty ?

    With only Yoast installed, if the meta description is empty, the tag is removed from HTML. With your plugin, if the description is empty, you fill it with the post content. There is a reason ?

    Yes because Yoast use a function that use the_content and our plugin get executed also in meta description that is something that we don’t want, so that feature is to replicate the yoast behavior.

    Thread Starter Aurélien Joahny

    (@ajoah)

    Ok I understand but are you sure Yoast still use the_content ?

    I checked the yoast function which get the excerpt :

    	private function retrieve_excerpt() {
    		$replacement = null;
    
    		// The check <code>post_password_required</code> is because excerpt must be hidden for a post with a password.
    		if ( ! empty( $this->args->ID ) && ! post_password_required( $this->args->ID ) ) {
    			if ( $this->args->post_excerpt !== '' ) {
    				$replacement = wp_strip_all_tags( $this->args->post_excerpt );
    			}
    			elseif ( $this->args->post_content !== '' ) {
    				$replacement = wp_html_excerpt( strip_shortcodes( $this->args->post_content ), 156 );
    				// Trim the auto-generated string to a word boundary.
    				$replacement = substr( $replacement, 0, strrpos( $replacement, ' ' ) );
    			}
    		}
    
    		return $replacement;
    	}

    As you see, Yoast use $post->content directly.

    I ask this because i want either the meta desc to be empty or to be at least not too long. With your code I get 400 characters for the meta description. (the yoast code limit it to 156 characters)

    I can update the code of our yoast support to this one to avoid those cases.
    Thanks to let me know, maybe for the next week I can release a new version.

    Thread Starter Aurélien Joahny

    (@ajoah)

    Or you can delete it no ? Because Yoast doesn’t use the_content anymore and so your plugin doesn’t executed. Or I am missing something ?

    You can just keep a backward compatibility for old versions of Yoast (but I checked their code, they use post_content for a long time. I didnt find any reference to the_content function for meta description)

    In any case, thank you for your great responsiveness.

    It’s in my plan to test all the cases, if we can drop the specific support will be better.

    I did some testing and you are right the newer version doesn’t have anymore that poblems.
    I am releasing now a new version with this code removed.

    Thread Starter Aurélien Joahny

    (@ajoah)

    Perfect, thank you for your great support.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Incompatibilty between this plugin, Yoast and WPBakery page builder’ is closed to new replies.