When site is login required you can not onebox any local topics

Hi there,

I’m experiencing issues with OneBox links. If I open a topic, I get an error code 404. The boxes worked before. Any idea why this is?

Here’s the error message:

Here are my settings:

Reproducible on our hosted instance forum.plentymarkets.com

Tell me if you need more information. Thanks!

@zogstrip can you have a look? we recently changed the way urls are translated, maybe it is related?

I’m pretty sure that oneboxing never worked when login_required is enabled. Since the oneboxer makes anonymous HTTP requests, it can only see what’s visible to anonymous users.

2개의 좋아요

I am going to recategorize this as a bug though.

The oneboxer should be doing reqs as a logged in user, it hurts us on dev as well, we can not onebox anything local.

Sorry, I’m not following. Local onebox works fine on login required forums.

Is the topic in a private category?

3개의 좋아요

I wonder about cross-category oneboxing. If a User A posts in category A with a onebox from category B, but doesn’t have access to category b, will the information be shown?

If User A has access to both categories, but user B, who is in category A, doesn’t have access to category B, a successful onebox might share too much information.

Not sure about that are you sure you are not confusing onebox with quoting?

1개의 좋아요

So far as I recall oneboxing worked fine in our login required forum. It was/is a heavy used feature. And it’s not a private category.

We also oneboxed links to private categories. Users without permission didn’t see the box, just the link. If they click the link, they get an “error message”. That’s fine.

If I have the time today I will checkout and test some previous versions of Discourse locally.

2개의 좋아요

Pretty sure I’m sure that is onebox for sure :laughing: (sorry)

I even sent a PR to fix this on subfolder installs! It uses the local onebox engine, to bypass login. It’s inside the discourse project, not the onebox project.

3개의 좋아요

@Falco was right. It worked for quite a while :wink:

The only time it doesn’t work is when the topic is in a private category.

I cleaned up and optimised the code too :strawberry:

https://github.com/discourse/discourse/commit/a655e4b09259fa5a908416b0add303d7c710ac1f

6개의 좋아요

This topic was automatically closed after 24 hours. New replies are no longer allowed.