SmartCrawl OpenGraph issue

I've set an image as a thumbnail for social media but it's not showing. Instead, it's showing a random product image.

  • Adam Czajczyk
    • Support Gorilla

    Hello Anthony

    I hope you're well today and thank you for your question!

    I checked the site's source code and there's an the issue with OG tags is that there are two sets of them in the source code. The first one is from SmartCrawl and it does not, additionally, include image tag (so it doesn't specify any image) and the second one is from Jetpack plugin.

    There should be only one set of tags so the first thing to do would be to either disable these OG tags in Jetpack or in SmartCrawl. If the SmartCrawl's is what stays on the, page, you'd also need to go to "Pages -> All pages" and edit the homepage. There in the "SmartCrawl - Social" metabox you can actually set an image that should be used.

    Once that's done, you also might need to clear all caches on site.

    That being said, I tried to check your site directly to see if if that's all properly set but it seems that the login credentials that you shared during the chat are no longer valid and I can't log in. If you need further assistance with this, could you please enable support access to the site then?

    To do so, please go to the "WPMU DEV -> Support" page in your site's back-end, click on "Grant support access" button there and let me know here once it's done.

    Best regards,
    Adam

  • Anthony
    • WPMU DEV Initiate

    I am not sure how to turn off opengraph in Jetpack there is not option for that, and I cannot deactivate jetpack completely as some woocommerce services require it. I have already granted access from when I first asked for support so not sure why you can't access it. My sites were having some issues where they were timing out not sure if it related. A featured image is already set in the smartcrawl settings it still isn't working correctly.

  • Predrag Dubajic
    • Support

    Hi Anthony,

    I did some additional testing on my installation and I had some issues when JetPack's "Automatically share your posts to social networks" option is enabled but even with that the OG data from JetPack was shown in page source, however it didn't affect my image set by SmartCrawl.

    It seems that something else on your site is affecting the data being pulled from SmartCrawl itself.

    Could you perform a troubleshooting test by disabling your other plugins and switching to default WP theme and see if the selected image is properly shared after that?
    This should help us determine the cause of this so we can debug it further.

    I would suggest doing this test on a staging site or if you don't have a staging site then make sure to have a full site backup ready before proceeding with the test.

    Also, when you disable plugins make sure to clear any server side caching.

    Let us know how it goes.

    Best regards,
    Predrag

  • Anthony
    • WPMU DEV Initiate

    Hello, sorry for the delay in response. I have tried disabling all the plug ins and switched to a twenty seventeen theme and cleared the cache on a staging site and when i run the debugger no picture shows up at all and it says 404 page not found in the facebook preview area. Staging site url is here

  • Adam Czajczyk
    • Support Gorilla

    Hello Anthony

    I apologize for keeping you waiting!

    There must be something in common then between these sites and this might indeed help us narrow things down. Could please also enable support access to that other (agsdesign.net) site so we could also check it? This might give us some additional clue on what's happening.

    To enable support access just to to the "WPMU DEV -> Support" page in site's back-end, click on "Grant support access" button there and let us know here.

    Kind regards,
    Adam

  • Predrag Dubajic
    • Support

    Hi Anthony,

    I was doing some extensive testing on both of the sites trying to find the connection but I'm afraid that I don't see anything that could be causing this.
    Could you give us access to your staging site where we could perform some additional tests that can affect site functionality so we should do it on staging environment?

    You can go to your dankstyles site admin, navigate to WPMU DEV > Support and in the message field leave us your staging site URL, access details for popup protection and WP admin login.

    Best regards,
    Predrag

  • Adam Czajczyk
    • Support Gorilla

    Hi Anthony

    I accessed and checked the staging site that you provided credentials to. However, when checked with Facebook Share Debugger this one seems to be fetched correctly - in a way that is defined by OG tags.

    I noticed, however, that pretty much all the plugins are disabled there and the theme is different. I could switch the theme (in fact I tried that) but it would be best if you could actually configure that site to be set exactly the same way as the live one is - that's a starting point that would actually let me go further, If on the staging site set that way the issue is fully replicated. I apologize for additional inconvenience but I'd really appreciate it as it would help us a lot in troubleshooting the issue.

    Best regards,
    Adam

  • Predrag Dubajic
    • Support

    Hi Anthony,

    It looks like JetPack is taking over Open Graph data and it links to an image that goes to 404 on your site, and that is probably what's causing the wrong image shared on Facebook.
    Try disabling JetPack, clear all the caching on your site and then try sharing your page again on FB to see if it will now pull the correct image.

    Best regards,
    Predrag

  • Adam Czajczyk
    • Support Gorilla

    Hi Anthony

    Unfortunately, support access to agsdesign.net seems to be no longer active so I couldn't take a closer look but checking the site from outside, I can see that:

    1) there are currently two "meta og:image" tags in the source code; Facebook will take the first one only which currently is set to this image

    agsdesign.net/wp-content/uploads/2019/01/email-banner.jpg

    Is this the image that should be used? If not, which image should be?

    2) however, if you make use of Facebook share debugger (https://developers.facebook.com/tools/debug/sharing/) and run your homepage through it, you'll notice that it takes yet another image to share; it seems that image comes from some internal cache - Facebook will fetch already cached image if it an image coming from the site is invalid

    3) I mentioned "invalid" above and that's exactly what FB share debugger says about the image mentioned in the 1st point above: it says it can't be used becuase "it did not meet the minimum size constraint of 200px by 200px" - which basically means at least one side of it is smaller than 200 pixels.

    Putting that all together: we need to make sure that only one "meta og:image" tag is used on the site, that it contains the image that you actually want to use for sharing and that this image is at least 200x200px in size.

    Since you have disabled Jetpack there, it shouldn't be overriding tags on site so first thing to do would be to clear all possible caches on site and server and check again. Have you tried that? Could you clear Hummingbird's cache and any other cache (on site and server) if there is any and then run homepage through FB share debugger to see if that fixes the issue?

    If not, could you please enable support access to the site again so I could take another look at the configuration? Just let me know when you do, please as I won't be automatically notified.

    Best regards,
    Adam

  • Predrag Dubajic
    • Support

    Hi Anthony,

    Can you tell us which image you want to see when you share the page?

    I checked on my end and this is what I see:

    That image seems to be the one that you have set as featured image for your homepage and from the looks of it your theme is adding it as OG image as well, and it's put before the one added by SmartCrawl so it's what is shown when you share it.

    I don't see this image displayed anywhere on the page itself so can you try removing it as your featured image, clear the cache again of course, and then see if the proper image is shown?

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.