Different error pages for 404 (not found) and 401 (private)

(context: I’m having a forum with a lot of private groups/categories for working groups)

When a visitor goes to a private category, they get a:

Oops! That page doesn’t exist or is private

with additional features (go see the top posts…) that are tailored to a page not found

My users tell me it’s confusing and most don’t see the “or is private”.

Is is possible for categories (or topics) that are private to

  1. display the title or the description
  2. have a more visible “login” link
  3. have a “register+request to join the group” simplier workflow?

I saw a previous/related question and I don’t mind writing a plugin, but not clear if it would be possible from a plugin… or what would make it generic enough to be useful for others

https://meta.discourse.org/t/custom-wizard-plugin/73345/531

Is this possible to have a different page/error messages if a user lands on a private item?

1 Like

I’ve also been looking to come up with a way to improve this page. I run a membership site and it is confusing for users to click a link to a discussion in a private group and be greeted with a page that seems like a 404 error.

Any ability to add custom content to this page would be very welcome. I’d also be willing to pay someone to help customize if possible.

Did you enable the detailed 404 page in your site settings?

3 Likes

Ooooooh, much better indeed, thanks!

image

There is still something a bit off in the workflow, when (as an anonymous visitor), I click “Request Membership”, I end up on the group page

image

and then I can use the button on the top right to join
image

What’s the point of showing the empty group page (I don’t display the members, but even if the list was public, I don’t see why showing the members of the group is useful when I click on request membership)

Two things could improve the user experience IMO:

  1. Adding a “login” button next to the “request membership” (if anonymous user)
  2. skipping the group page and directly go to the request membership

Does it make sense?

4 Likes

I added a login button near the “Request Membership” or “Join” buttons.

https://github.com/discourse/discourse/pull/10154

4 Likes

I have enabled 404, but still when I try to access a page as not logged in I don’t see a button like in Xavier’s screenshot.
Just " That page is private. "
Am I missing something?

1 Like

What page are you trying to access? That page is usually shown if the user can do something to gain access (i.e. login, join a group).

2 Likes

I’m trying to access e.g. a topic in the staff category.

In that case there is nothing the user could do to become a staff member.

There is still a slight change from:

Oops! That page doesn’t exist or is private.

to

Oops! That page is private.

which lets the user know that the page exists but is private.

Right, but If the user is anonymous and has a staff member account it would make sense to have a log in button, IMO.

So currently it works for categories that membership to can be requested?

Oh, I understand your point now. I think I can add a Log In button for any kind of error as long as the user is not logged in. Not sure if always or only if detailed 404 errors is enabled.

4 Likes

That would be awesome!

I’d say always, but this is Discourse team’s decision (I guess the team’d prefer to keep it when detailed 404 errors is enabled) :slight_smile:

2 Likes

Hi team, is there a plan to add that?
I also tried adding a link in the text customization, but it didn’t work.
Wanted to do it also via a theme component, but the template doesn’t seem to have any plugin-outlets.

1 Like