Pinterest share button social element - "Cannot fetch image" error

Anytime I try to share my post via the built-in pinterest social button cornerstone element, I get an error that reads: “Sorry we could not fetch the image.”

I’ve done some research and narrowed down the reason to the fact that the pinterest share button is trying to fetch the image over HTTPS instead of HTTP. For example, here is the default code that executes when the button is clicked:

window.open('http://pinterest.com/pin/create/button/?url=https%3A%2F%2Fwww.boarsart.com%2Fcharles-scotts-weekly-album-cover-design-project%2F&media=https%3A%2F%2Fwww.boarsart.com%2Fwp-content%2Fuploads%2FCharles-Scott-Album-Covers.jpg&description=Charles+Scott%26%238217%3Bs+Album+Covers+Balance+Artistic+Expression+and+Visually+Representing+Their+Music', 'popupPinterest', 'width=750, height=265, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0');

The above code results in the image fetch error. I’ve tweaked it into a working version down below:

window.open('http://pinterest.com/pin/create/button/?url=https%3A%2F%2Fwww.boarsart.com%2Fcharles-scotts-weekly-album-cover-design-project%2F&media=http%3A%2F%2Fwww.boarsart.com%2Fwp-content%2Fuploads%2FCharles-Scott-Album-Covers.jpg&description=Charles+Scott%26%238217%3Bs+Album+Covers+Balance+Artistic+Expression+and+Visually+Representing+Their+Music', 'popupPinterest', 'width=750, height=265, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0');

The only difference between the two is this part: …&media=https%3A…
If that little bit is changed from https to http, it works fine. But I don’t know how to enact this change.

Here’s an example post on my site. The pinterest share button is at the bottom of the post content if you want to try for yourself.

How can I fix the Pinterest share button?

Hello Boris,

Thanks for writing in! We do not have a Pinterest share button element. You may have added a button icon element and inserted an onlick attribute with the Pinterest JS code. Kindly check if you are using the correct Pinterest JS code. If nothing is helping, provide us access to your site so that we can check your share button settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi Ruenel,

I’ve set up the admin account and made the secure note. The exact element is the ‘Social’ element under the standard elements list. I set it up as a pinterest button by changing the ‘Behavior’ section to use the ‘Pinterest’ option in the dropdown menu. I didn’t enter in any kind of ‘onclick’ button behavior, it’s built into the theme.

The exact place it’s built into the theme is here:
wp-content/themes/pro/cornerstone/includes/classes/common/class-social.php
Line 98

It’s pulling the URL for the image via the $share_image variable, but I don’t want to mess with any internal theme files like that.

When you guys take a look at it, the template is a layout called “Content With Sidebar (Post)”

Thanks,
Boris

Hi Boris,

It might be some issue with your .htaccess file Rewriting non-SSL to SSL traffic. I would suggest you to go through thee following article and the video which may help you on this.



Hope it helps.
Thanks

Hi Tristup,

I ended up just editing the theme files to replace https with http for that particular function.

Hey Boris,

We are glad you’ve figured out a way to resolve your issue.
Thank you very much for letting us know.

Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.