Yes, I did pretty heavy changes (since this was just a test post, it was not a problem. I added text, I deleted text, I added other links (which oneboxed just fine)…
What if these edits happen within the 5 minute grace period, though?
Yes, I did pretty heavy changes (since this was just a test post, it was not a problem. I added text, I deleted text, I added other links (which oneboxed just fine)…
What if these edits happen within the 5 minute grace period, though?
That should be OK then. I will confirm about the invalidation of the onebox today. Maybe I’m mistaken about it being updated on save.
I was able to reproduce this. At some point the behavior regressed. With this commit, if you edit a post that contains a onebox it’ll force it to refresh via the preview. Locally it seems to work for me!
https://github.com/discourse/discourse/commit/2ff850d4465fdb11f61110d70cd25c5b39defefd
Sorry for jumping into this discussion just like that, but seems like I am experiencing almost the same problem but with Medium blog posts.
This medium post and this corporate medium blog post using the same open graph tags but off course with different content and on different domains. Why in one case Onebox works perfectly and in another doesn’t?
Thanks!
Can you reproduce the issue on https://try.discourse.org ?
That one is odd, I checked iframely.com/debug
and I don’t see anything obviously different about the 2nd link that would make it not work @eviltrout. Warrants a closer look.
This is a strange error. The Medium site is returning status code 409 when you make a HEAD request which indicates a conflict.
I added 409 to our list of “try again with GET” codes and it’s now working. I’m not sure why they’d consider a HEAD call a conflict but this does seem to fix it:
https://github.com/discourse/discourse/commit/7366f334b04aa65065f835ecad137853fa94387f
Wow, that was fast
Sorry for asking a possibly stupid question but how do I now apply this change to my community website?
Update via the web updater or at the command line.
So I did the update through the command line, to double-check did git pull
command once more and got Already up to date
response, so I should be fine. Cleaned all cache and tried to post the same link from the Medium site. Got same negative result with onebox.
@eviltrout what do you think about that?
Let’s see
https://themission.co/stop-nobody-is-going-to-be-your-mentor-6a14d5aa2a13
Doesn’t seem to work here either.
Huh there’s something really weird about that redirect that I can’t figure out.
When you request the first URL, it redirects twice, setting a cookie. I am following this procedure, and it ends up with a 200. I pass that cookie and final destination to onebox, but it wants to do the whole redirection thing again! This causes it to fail because we ask the onebox to use the final url.
I’ve spent a couple of hours on this and I have no idea why it wants to do the redirect again. I’m wondering if they have some kind of fingerprinting in place to prevent you from passing cookie’d URLs around to different clients?
I’ve never seen it before so I am quite confused.
I definitely don’t want to spend any more time on this, so that URL can be unknown onebox behavior at this time. Sounds like the redirects are required, somehow…