Google photos onebox isn't quite right
-
Bug description
When I view a onebox for a "Google photos" album I see a picture that is clickable, but the link doesn't take me to the correct location.Actual result
![0_1499691386603_1cf9849b-df2a-446c-98f4-9cd2350be24f-image.png](/assets/uploads/files/1499691387365-1cf9849b-df2a-446c-98f4-9cd2350be24f-image-resized.png)Expected result
![0_1499691423650_d7861f24-0968-4a7b-afd4-055c4fe1ef25-image.png](/assets/uploads/files/1499691424016-d7861f24-0968-4a7b-afd4-055c4fe1ef25-image-resized.png)Sample repro
Here's a sample onebox of a "Google photos" albumThe above link should take you here: https://goo.gl/photos/PaVEUvB18Kx6HFHAA.
Repro code
https://goo.gl/photos/PaVEUvB18Kx6HFHAA
-
IFramely Debug: http://iframely.com/debug?uri=https%3A%2F%2Fgoo.gl%2Fphotos%2FPaVEUvB18Kx6HFHAA
Looks like all the URLs are set to the image rather than the album.
-
@raceprouk said in Google photos onebox isn't quite right:
rather than
So who wants to tell Google to fix their shit?
-
@tsaukpaetra isn't this a NodeBB bug, with how they do their oneboxing?
I've given it the correct link for the album, somehow it's linking to the picture instead.
-
This is because the OpenGraph data links to the one image.
Problem is Google here.
-
No, the problem is iframely. It's generating this:
"html": "<img src=\"https://lh3.googleusercontent.com/1GzSADYzry6eMotuohoryDidSH2a3RnD58wvy49JFV5qEOcrtjL0432csBtjMJEVW7HQtGF66y79E68BNR1sME1XnMOGX6pW1XusbcENpYH4ZPI3dsr2ILj_-fE6mJQ1eGTgz3ImZdY=w600-h315-p-k\">"
I'll modify nodebb-plugin-iframely to handle this and wrap it in a link.
-
-
@ben_lubar Oh, is that why I just got a 502 Bad Gateway?
-
@raceprouk said in Google photos onebox isn't quite right:
@ben_lubar Oh, is that why I just got a 502 Bad Gateway?
If it was in the last minute or so, yes.
-
@raceprouk said in Google photos onebox isn't quite right:
502 Bad Gateway
This should be changed to 502 NodeJS strikes again
-
@ben_lubar said in Google photos onebox isn't quite right:
No, the problem is iframely. It's generating this:
"html": "<img src=\"https://lh3.googleusercontent.com/1GzSADYzry6eMotuohoryDidSH2a3RnD58wvy49JFV5qEOcrtjL0432csBtjMJEVW7HQtGF66y79E68BNR1sME1XnMOGX6pW1XusbcENpYH4ZPI3dsr2ILj_-fE6mJQ1eGTgz3ImZdY=w600-h315-p-k\">"
I'll modify nodebb-plugin-iframely to handle this and wrap it in a link.
Except that wasn't what the reported issue was.
You put in a link to an album and get only a single image back - this is because Google only supplies Iframely with the data for a single image...
-
@arantor the reported issue was that clicking on the image gave you the image instead of the thing the image represented.
-
@ben_lubar said in Google photos onebox isn't quite right:
@arantor the reported issue was that clicking on the image gave you the image instead of the thing the image represented.
So did you have it wrap it in a link that links to the gallery, or....?
-
@tsaukpaetra said in Google photos onebox isn't quite right:
@ben_lubar said in Google photos onebox isn't quite right:
@arantor the reported issue was that clicking on the image gave you the image instead of the thing the image represented.
So did you have it wrap it in a link that links to the gallery, or....?
...yes?
-
@ben_lubar said in Google photos onebox isn't quite right:
@tsaukpaetra said in Google photos onebox isn't quite right:
@ben_lubar said in Google photos onebox isn't quite right:
@arantor the reported issue was that clicking on the image gave you the image instead of the thing the image represented.
So did you have it wrap it in a link that links to the gallery, or....?
...yes?
I'm confused what the problem is then?
-
@ben_lubar I understood the issue as that it wasn't embedding a gallery. Seems I may have been misunderstanding.
-
@ben_lubar said in Google photos onebox isn't quite right:
@arantor the reported issue was that clicking on the image gave you the image instead of the thing the image represented.
Bingo!
-
@ben_lubar said in Google photos onebox isn't quite right:
Thanks Ben, that'll make my future gallery posts a bit easier.
-
@ben_lubar said in Google photos onebox isn't quite right:
https://github.com/NodeBB/nodebb-plugin-iframely/pull/30You know what might be even better? If iframely inserted a simple text == source_url link before every dumbbox, so that even the worst dumbboxen are guaranteed at least one useful and discoverable link. I modified the quote for an example.
Also, why
RegExp.exec()
instead ofRegExp.test()
?
-
Whee, zero of two test cases pass with the suggested replacement code.
-
@ben_lubar said in Google photos onebox isn't quite right:
Whee, zero of two test cases pass with the suggested replacement code.
RIP