WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Disable OpenGraph in Jetpack (12 posts)

  1. theComplex
    Member
    Posted 4 months ago #

    OpenGraph in Jetpack causes there to be two sets of og tags, which causes an error. Joost over at Yoast brought this up and published a solution way back in 2012 (https://yoast.com/jetpack-and-wordpress-seo/). When can we anticipate this being fixed?

    https://wordpress.org/plugins/jetpack/

  2. quailrunphotos
    Member
    Posted 4 months ago #

    I have tried the solutions recommended by Yoast, but they did not work on my site. I have finally given up on Jetpack Publicize and turned it off along with a couple of other features that either didn't work or conflicted with plugins that I need.

    I hope Jetpack will address this issue soon.

  3. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 3 months ago #

    Hi all,

    If the Yoast plugin is active on a site, Jetpack should turn off it's own OG tag generation automatically, and has done so for a while now. If it isn't workingfor you, could you post your site URLs here, so I can have a look?

    If you want it to remain private, you can also contact us via this contact form:
    http://jetpack.me/contact-support/

    If you contact us through our form, please make sure to include a link to this thread in your message.

  4. Goose
    Member
    Posted 3 months ago #

    Jetpack was generating additional OG tags on my site as of today which was using WP SEO Premium (the premium version of the WP SEO plug-in). I could see both sets of OG tags when viewing source. I installed the following plug-in and it seemed to fix the issue:

    https://github.com/sgthemes/Remove-Jetpack-Open-Graph-Tags/blob/master/RemoveOGT/index.php

    Hope that helps.

  5. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 3 months ago #

    Thanks for that information. We detect the active plugins by their filename; if Yoast's Premium version of the plugin uses a different file name, then that would be why. I can add it to our list though; can you tell me what the directory and filename of the plugin is? For example, the non-premium version looks like this:

    wp-content/plugins/wordpress-seo/wp-seo.php

    I would need to know the main filename for the plugin and the directory for it. If you can provide that for me, I'll get it added to the list of plugins that automatically causes Jetpack to deactivate it's OG tag production.

    Thanks!

  6. Goose
    Member
    Posted 3 months ago #

    Hi Rich - TGIF and for your response. I'm not a techie but think I have an answer:

    This is the directory of the plug-in I see when I access via FTP:

    /wp-content/plugins/wordpress-seo-premium/

    There are folders within that folder, but directly inside I see two PHP files that may be relevant:

    /wp-content/plugins/wordpress-seo-premium/wp-seo-main.php
    /wp-content/plugins/wordpress-seo-premium/wp-seo-premium.php

    I thought I'd give you both as I'm not sure which is the important one (or whether both are!)

  7. Goose
    Member
    Posted 3 months ago #

    Rich - one more thing - the links I provided above are for the premium version - I'm not sure if the file names have changed in the non-premium version - perhaps the OP can provide this information.

  8. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 3 months ago #

    Goose, thank you so much. If possible, could you take aone step to confirm which one of those files is the right one (it might be both, in fact). Here's how to test it:

    1) Reactivate Jetpack's OG tags by deactivating the plugin you installed (the https://github.com/sgthemes/Remove-Jetpack-Open-Graph-Tags/blob/master/RemoveOGT/index.php )
    2) View your site's source and confirm that Jetpack's OG tags are there, along with Yoast's
    3) If they are indeed there, then edit the class.jetpack.php file in your site, at about this line:

    https://github.com/Automattic/jetpack/blob/2.9/class.jetpack.php#L695

    add one of the 2 file names, following the model there exactly, so as to not mess up your site. So, for example, at the end of the list, write it as such:

    'wordpress-seo-premium/wp-seo-main.php',

    With the quote marks and the comma, very important.

    Once you've edited the file, refresh your site and view source again, to see if Jetpack's tags are there. If they aren't, great, that fixed it! If they aren't, then try with the other file-name, /wp-seo-premium.php.

    Let me know how that goes! If you'd rather not, then I guess we'll add both filenames so as to make sure it works.

  9. Goose
    Member
    Posted 3 months ago #

    Ok I gave it a shot - the first addition (adding 'wordpress-seo-premium/wp-seo-main.php',) did not seem to work but the next one did work:

    'wordpress-seo-premium/wp-seo-premium.php',

    So, for the premium plug-in I think that one addition by itself does the trick.

    Hope that helps!

  10. TacoVerdo
    Member
    Posted 3 months ago #

    These are correct filenames for the Yoast plugins.

    WordPress SEO by Yoast
    wp-content/plugins/wordpress-seo/wp-seo.php

    WordPress SEO Premium by Yoast
    wp-content/plugins/wordpress-seo-premium/wp-seo-premium.php

  11. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 3 months ago #

    Thanks! I've submitted a PR for WordPress SEO Premium's inclusion in our OpenGraph code here:

    https://github.com/Automattic/jetpack/pull/514

    We already include WordPress SEO by Yoast. :)

    Thanks again everyone!

  12. George Stephanis
    Automattic Lead Code Monkey
    Plugin Author

    Posted 3 months ago #

    Merged. It will ship out with 3.0.

    In the mean time, any third-party plugin can turn them off with a single filter, if you'd like it to work smoothly with old versions of Jetpack.

    add_filter( 'jetpack_enable_open_graph', '__return_false' );

Reply

You must log in to post.

About this Plugin

About this Topic