How can users sign up for or log into the forum when they encounter page not found?

When someone gets onto page not found, they get a message that the page doesn’t exist or is private. I want to provide additional information to help people find a private page by asking them to sign up or log in to the forum.

I can just change the text, but I don’t see the log in and sign up buttons on this page. I also tried changing the text to include the links, but saw that doesn’t work.

Any suggestions? Is there a way to make sure these buttons are available?

1 Like

It does seem weird we suppress everything on the right hand side when rendering a 404 @sam

I agree for perf reasons we probably don’t want to render everything over there but it’s so far to the other extreme now, rendering total nothingness.

4 Likes

The trouble is that we need the full JS kaboodle to render that correctly according to whatever theme/plugin is in place.

But maybe we try to see how much mileage we get from hardcoding the HTML in that section and just forcing it to redirect somewhere on click. CSS is still sent down so at least theme CSS should be respected here which gives customizers a bit of a way out.

2 Likes

Mainly I am thinking the argument for putting a “sign up” and “log in” here is quite strong… because @debryc is right, if you hit this 404 page due to insufficient permissions, where is the call to action to “fix” the problem and log in? :thinking:

4 Likes

Lets try that … we have static routes for “sign up” and “log in” … @techAPJ can you lift the HTML for the “anon” case.

Logged on users should still get blank for now.

7 Likes

Done via (for anon users):

https://github.com/discourse/discourse/commit/324e182842b29cbc2917848d262e2f840af990ff

6 Likes