Link resolution (Onebox) stopped working

I was able to insert links to other topics and Discourse would automatically load the title for the topic but recently it fails to do this. For example, when I paste a link to another topic I created earlier on Meta: Video Upload to YouTube and Vimeo using Theme Component

Here the link resolves to the topic title. But on my forum it fails to do this and just remains as the topic link.

Anyone can help resolve this? This only started happening 2 days ago, no update or change in settings. Just stopped working mid-post. While I was writing the post, the first link resolved and then later it just stopped.

2 Likes

Are you being rate limited?

3 Likes

I don’t think so because it is a very low activity site and there are no more than 3-4 users active at a time.

2 Likes

Is the topic you’re linking to in a private category? They stay as the raw link and don’t inline onebox.

7 Likes

Ah yes, this would explain it. I did recently change some category security options.
But this seems like a flaw. I am posting from one category that has the same privileges as the other so don’t see why it shouldn’t resolve. But I can understand now what is going on, so thank you!
If anyone from the team could respond whether this may be resolved or considered a feature request?

4 Likes

While you may have access to the restricted category that the link points to @ti0 , other users will not.

If Discourse were to onebox/preview content from restricted categories it’d be leaking data quite badly :grimacing:

3 Likes

Yes I agree with that, although what I was suggesting was that when both categories (source of link and destination where new topic is created) have the same access level, it should onebox. But I get that could be very complicated.

3 Likes
On reflection, I'm not sure this was helpful...

The ‘how’ is too technical for me, but I think the inline oneboxes are a newer feature than the original oneboxes, and may have inherited some of the originals behaviour. If so, there maybe some scope to amend it somehow?

Normally an in-forum onebox of a public post would show pretty much all the posts details, which would sidestep the category permissions if private topics were handled in a similar way. But an inline onebox has much less information displayed (and maybe could be reduced to just the topic title in these cases). That would make both public and private links behave in a similar way, without revealing much more than the raw link would.

At the moment these are how a private topic can be displayed in a separate public topic (this example is a private message, but posts from restricted categories look the same):

In the middle of a sentence, https://meta.discourse.org/t/test-message-for-oneboxing/213633/2?u=jammydodger, for inline.

On a line of its own for the original onebox:

https://meta.discourse.org/t/test-message-for-oneboxing/213633/2?u=jammydodger

And quoted:

There does seem a bit of leeway to tweak them to be prettier without wrecking the category restriction/data leak protection. But I have no idea how one would go about it. :slightly_smiling_face:

3 Likes

I have just tested this out on my test site using the link in the OP and it oneboxes up just fine. :+1:

Is this still an issue for you @ti0?