Onebox is getting broken for some old links. I’m pretty much sure the link isn’t broken. Because if I click edit button and without any edits, I post again, they become OK. Any Idea?
What do you mean? Can you provide examples?
For example this post has a oneboxed url that is not showing anything.
you can see that the url is fine:
What happens if you rebake the post? (In admin wrench, select Rebuild HTML.)
Are you certain that this link has been oneboxed previously in this post, i.e. the post randomly reverted to one without a link?
I tested it and It got fixed.
Yes I’m absolutely sure. Because sometimes it happens for my own oneboxes. Its worth mentioning that only these kind of links which are shared videos from streamable are getting broken.
That’s weird. Usually, as long as a post is not edited, it shouldn’t change at all – the HTML is baked and stored in the database.
I think there is a background task that slowly rebakes old posts over time. The only explanation I have is that either Streamable or your server had network issues or other problems when such a rebake occurred, so the URL failed to onebox then?
You mean Its something in core discourse? Because I don’t have implemented such a background job.
It makes sense. Is there anything to rebake all post? Or even better, all posts that have these kind of links?
Yes, that’s what I meant. And I remembered correctly, the feature is controlled by the
rebake old posts count site setting
Sure thing! You need console access to the server, however. This should do it:
cd /var/discourse ./launcher enter app rake posts:rebake_match["https://streamable.com/"]
You can find details here:
Why do we even need this? Is there any way to disable it? or making the interval longer than 15 mins?
I’d think that setting the site setting to 0 would disable the feature, but I wouldn’t recommend doing that – it’s here for a reason, probably to ensure that updates to settings, the onebox engine or other features also affect old posts (over time)
This is not due to rebaking the HTML but streamable (for any cases it was a streamable link) blocking embeds of their videos directly.