While porting to Backdrop and testing, I found that the Pinterest button doesn't work. It also seems to make sense to default the URLs to https.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | pinterest_fix-issue2909768-comment11.patch | 824 bytes | laryn |
| #6 | Screen Shot 2017-09-26 at 3.18.16 PM.jpg | 165.85 KB | laryn |
| #6 | Screen Shot 2017-09-26 at 3.16.49 PM.jpg | 263.35 KB | laryn |
| #2 | config_tweaks-2909768-2.patch | 2.33 KB | laryn |
Comments
Comment #2
larynHere's a patch that works for me (the hack on the Pinterest URL doesn't seem to be required anymore).
Comment #3
adamps commented@laryn Thanks for the report
The hack on the Pinterest URL came about from an issue raised by a past user who gave a clear description of why it was needed, including the link present in the code file.
I don't use Pinterest myself. It's difficult as a maintainer when someone proposes a patch stating that "the button doesn't work" without giving details. If I were to apply your patch it seems possible that it would starting working for you but stop working for the other user. Please can you provide any more details
Also note that D7 is now bug fixes only, with D8 as the active branch. The change to use HTTPS sounds like a good idea, but should go into D8 please as a separate patch.
Comment #4
laryn@AdamPS I can't speak to why the hack was added in that way. I only started digging because I set it up for someone and Pinterest was not working. I looked at the link that was in the code but didn't see a clear reason why this hack was needed. The thread on SE seems to be about preventing Pinterest's js from hijacking things, but you aren't loading Pinterest's js to my knowledge (ie. "No third-party scripts").
I found the old issue (https://www.drupal.org/node/2566647) and see it seems to relate to a separate module hijacking the link. I don't have a solution for that (I don't use that other module) but do still report that Pinterest links were not working for me.
I've made a separate D8 patch for SSL.
Comment #5
adamps commentedCorrect, RRSSB does not load 3rd-party scripts, but I believe the scenario is that something else on the page might have loaded them. It seems desirable if RRSSB still works in this case.
I acknowledge your report "Pinterest links were not working for me" but I don't think you have yet given any details for this: what steps to reproduce, what do you actually see, how does this differ from what you expect to see.
Thanks for raising the separate issue.
Comment #6
larynHere's an example of what I mean when I say it doesn't work. This link:
...produces the "Whoops! We couldn't find that page." response.
This page:
...produces a functional response.
(Screenshots attached).
Comment #7
adamps commentedComment #8
adamps commentedI don't use Pinterest and am having trouble reproducing.
Have you tried clicking the links in your comment? If I hover over them in Firefox it shows the exact same URL destination. I wonder if Pinterest will actually receive the exact same protocol bytes in each case - i.e. the encoding is a local concept on this page on drupal.org.
Perhaps you could share your site page, or send me a private message with the URL?
Comment #9
adamps commentedOK now that I have made a pinterest button I thought I might as well test for myself. It works fine for me in Firefox with %2F. So the first step is to establish why it doesn't work for you. Might it be a browser-specific thing?
The proper solution looks like it might be to use
http://pinterest.com/pin/create/link/?url=Any fix here needs to be tested with the Pinterest JS loaded.
Comment #10
larynStrange! I am in Firefox as well when I get the "Whoops!" page. I'll do some testing with the solution you suggest (I agree) with the Pinterest JS also loaded on the page.
This occurs even when I click on the links in my earlier comment.
Comment #11
larynResults of testing on a fresh install (dev server), on a page with Pinterest JS added:
Patch attached.
Comment #13
adamps commentedThanks @laryn
Comment #15
adamps commented