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


(Thorben Egberts) #1

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!


(Sam Saffron) #2

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


(Régis Hanol) #3

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.


(Sam Saffron) #4

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.


(Rafael dos Santos Silva) #5

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

Is the topic in a private category?


(Allen - Watchman Monitoring) #6

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.


(Sam Saffron) #7

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


(Thorben Egberts) #8

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.


(Rafael dos Santos Silva) #9

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.


Failure to onebox a local http page
(Régis Hanol) #10

@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:


(Jeff Atwood) #11

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