Problems with Pinterest Button - Error The Content-Security-Policy directive 'prefetch-src' is implemented behind a flag which is currently disabled - pinterest

I am having problems with the Chrome Pinterest Button, as well as with my own Pinterest Button in a site of a client.
When you try to pin an image, that image is not loaded in the pinterest's form. Instead you receive a 404 (Not Found) error, but the image and its url is actually perfectly correct. So there is no reason for that error. Actually, after loading the image in another tab, if you click again in the pinterest button the image then appears in the Pinterest's form.
The buttons have been working with no problem until the site changed to SLL and Php 7.1, but I really think this has nothing to do with the issue.
I have found the following error in the console:
The Content-Security-Policy directive 'prefetch-src' is implemented behind a flag which is currently disabled.
Do you have any idea about how to solve this?
Thanks in advance!

I solved. The problem was that the image what I am referring in the data-pin-media was not included in the post, so Pinterest is not able to get it without breaking the Content-Security-Policy.
So, I added and hide the image in the post, and now everything works as expected.
At any case, I had still a problem with the descriptions in the images to pin in pinterest that were not being taken properly. I solved taking a deep look to the url string and encoding some of the characters in the text that were making to fail the url like: | by %7C, etc..
Thanks,
PS It's just me, or lately no one offer his help answering questions on stackoverflow

Related

Laravel vapor returns message:null when click on browser back button

I recently started using Laravel vapor as my server and I've realized that when I click on the browser back (history) button, I get this weird message:
Image of the returned message
Did anyone have this issue?
I have no idea which part of the code to share with you that would be relevant for this issue since I didn't find any similar problem on the internet.
If you need something, comment and I will edit the question.
This is most likely due to you having a route with the same path for displaying and getting JSON data. The browser may cache the JSON version and show that when hitting the back button.
If you could share the relevant routes that match, I can go into more detail.

"Do you want to view only the webpage content that was delivered securely?" erroneously displayed

I have a site with all secured content. Everything is loaded using https. I have verified this using fiddler2, the built-in debugger, and the DebugBar plugin. Nothing is loaded using http. Nonetheless, I am still getting the "Do you want to view only the webpage content that was delivered securely?" when I try to load the page in IE8. My users are complaining and I don't have a clue how to fix this. They are not computer administrators and cannot change the security policy for IE on their machines.
I figured out the problem and figured I'd post it here in case anyone else ever comes across this issue. The problem is that IE8 was treating the CSS background property with a relative URL as unsecure. So I had something like this:
.SomeRule
{
background: url('/SomeFolder/SomeImage.png') 95% 50% no-repeat;
}
and I had to change it to this to make the warning go away:
.SomeRule
{
background: url('https://www.SomeSite.com/SomeFolder/SomeImage.png') 95% 50% no-repeat;
}
I had a similar problem with a WordPress site where I recently added SSL. Obviously, something was being loaded with HTTP protocol, but what?
First, I checked the obvious:
I checked embedded page and post images for fully qualified paths using http protocol.
Then I checked links relative to the root as #datadamnation suggested in his solution.
Next I looked in my CSS to see if a background image URL used the http protocol.
I checked my plugins and my plugins CSS.
I checked the content in the sidebar widgets.
I checked the images loaded in the carousel slider.
Finally, I checked the theme's header image. When I looked at it using Firebug, I could see that it was still using http. To correct it, I had to remove the WordPress header image, and then add it back again and save. Refresh the page, and now the mixed content warning message is gone! It would have saved me a couple of hours of trial and error if I had done this first, so maybe you'll read this and save yourself some time.

og:image content is recognized as a valid URL but is unable to retrieve image

We recently moved servers and I've been having this problem since.
I tried parsing this url1 in the Facebook Debug tool, and the thumbnail retrieved using the content of the og:image tag is displayed fine, but it won't display when I 'like' the story and it appears in my profile . This was a story posted before switching servers.
Now when I try parsing this url2 in the Facebook Debug tool, the thumbnail is not retrieved and with previous case the thumbnail won't display in my profile when I like this story. This is a story posted after switching servers.
The funny thing I try repeating these actions and the thumbnail does pop up randomly.
How does Facebook retrieve the image from my server? Does the problem have something to do with how this is done?
At one point, I thought FB would not show a thumbnail on a second post. Or something. It seemed to show the thumbnail again, if I changed the URL a bit (put some fake parameters in the url).
YMMV
Remove every og meta tags from the page, debug it into the facebook debugger tool, when it shows nothing, put the correct og meta tags again and debug again with facebok debugger tool.
This is a weird problem with facebook. It caches the old incorrect values sometimes.

Facebook recommend button showing wrong image

I have already searched the site but I can't find an answer to this. My problem is that Facebook is showing the wrong image after I press the 'recommend' button (it's the same as the 'Like' button but with different text).
The webpage is here: http://www.bamarang.in/perfume-tree/ and the facebook debugger is here: http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.bamarang.in%2Fperfume-tree%2F%3Ffb%3Dfgfgfg
The website needs an email but you can use a fake one to enter, as there is no confirmation.
As you can see everything seems to be correct but the wrong image is displayed. I've tried clearing the cache, on both the browser and Facebook (this last one by writing the webpage url's in the developer tool) but to no avail.
You can also see the webpage's source to check that all the OG tags are there and correct.
What else can I be missing? Please help.
See the wrong image showing up here: www.crosstastemovies.com/temp/fb_error1.jpg
See the FB scraper showing the correct image here: www.crosstastemovies.com/temp/fb_error2.jpg
I've updated the question to add the screen shots.
The link you provided for your site is: http://www.bamarang.in/perfume-tree/ but the link with the debugger is: http://www.bamarang.in/perfume-tree/?fb=fgfgfg.
As you can see those two urls are not the same.
I curled both urls, the first one returns a redirect to https://www.bamarang.in/customer/account/create/ and when curling that the output has no og tags in it (check yourself in the debugger).
The 2nd url (with the ?fb=...) indeed has the og tags.
What's the url you're using with the recommend button?
You should probably just output the og tags even when the fb parameter is not present, don't forget that people can just copy/paste the url into their status on fb, you have no control over how people share.

Why isn't Firefox submitting my form twice?

HTML/JS Here: http://pastebin.com/JrtfeAtw
PHP Here: http://pastebin.com/EcRHCwmY
Based on Ajax F1's tutorial here: www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html
Anyway, my problem. In Chrome, this works fine. However, in Firefox, it will upload the first file no problem, and begin uploading the second one. I've traced it in Firebug and it definitely calls form.submit() on the correct form, and the form has the correct fields in it, but for some reason my form never gets submitted.
Is this because I'm submitting the same form twice? And if so, is there a workaround that anyone knows of?
Cheers!
I have no explanation for this, however, setting the source of the iFrame to about:blank between each image upload fixed the issue.

Resources