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

סיכום מבוסס בינה מלאכותית

The discussion revolves around improving the user experience when users encounter a 404 page on a forum. debryc notes that the current 404 page lacks sign-up and log-in buttons, making it difficult for users to access private content. codinghorror agrees, pointing out that suppressing all content on the right side of the page is too extreme, especially since CSS is still loaded and could be used to display a call to action. sam explains that rendering the full UI requires JavaScript, but suggests hardcoding the HTML for the anonymous user section to include sign-up and log-in links. codinghorror supports this idea, emphasizing the importance of guiding users to log in when they hit a restricted page. sam assigns the task to techAPJ, who implements the change by adding static HTML for anonymous users, enabling them to access the sign-up and log-in options directly from the 404 page. techAPJ confirms the implementation via a GitHub commit.

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

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 לייקים

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 לייקים

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 לייקים

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 לייקים

Done via (for anon users):

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

6 לייקים