404 page doesn’t show controls in app

If I try to visit a deleted topic (by clicking a notification, for example) in the DiscourseHub app, I obviously get a 404 page. Some stuff is disabled on 404 pages. For example, I can’t tell that I’m logged in. Presumably this is to decrease server load. Makes sense.

But the problem is that I’m also unable to see the controls at the bottom of the page. Why should I not be able to go forward or back or switch to a different Discourse instance just because I’m on a 404 page?

1 Like

The back and forward buttons show for me though? If you scroll downward it pops up, see my view:

Also, you could click on any of the links to access another topic and navigate away. This wouldn’t be ideal though.

1 Like

Very odd. I did try this twice before reporting. On meta. The only way I could get them to show up was as you suggested, clicking another link.

Edit: Wait a minute. Does the 404 page work different for an admin? Because I couldn’t even tell that I was logged in until I navigated off the 404 page, whereas your profile pic is visible in that screenshot.

1 Like

I can’t say for sure, can you share a screenshot of what you are seeing?

Here you go

1 Like

This can happen when the contents of the page has a height that is near the height of the viewport. If you swipe up or down while on the 404 page, do the controls at the bottom start to show up?

I’m not sure there is much we can do here, plus it should be an extremely rare use case (getting to a 404 from a push notification, for example).

2 Likes

No, they don’t show up. I know how that works.

It’s not that uncommon for me to click through to topics that have been deleted. It has happened to me enough times that I’ve figured out when it happens and what exactly happens and how to get out of that state. (Force quitting the app is the way I normally get out of this state, since it’s the first way I figured out.) But yeah, it’s an edge case.

I don’t know where those controls are generated. I assumed it was in the app, not Discourse itself. If so, it seems odd to me that the app suddenly doesn’t show necessary navigation controls depending on which page you’re on. Up to you all whether it’s worth fixing or not. I just know that when it happens it always takes me a bit to figure out what’s going on. (Scroll up and down and wait for the controls, but they never show up. Then, in the past, force quit thinking the app is just not working.) Now that I finally figured out what causes it, I thought I’d report it.

Cheers.

2 Likes

They are generated in Discourse, not in the app. When we implemented that feature, we tried both approaches, and having them in Discourse was a much smoother experience.

I have never run into this screen, but different users use Discourse differently, so I understand it can be a common occurrence for others (and a frustrating experience). As you suspect, I think you are being served a quick static page for a 404. And I am pretty sure the bottom app controls are not included in static pages, which is why scrolling up/down doesn’t do anything. I will investigate and see if it is an easy fix to add the controls to static pages (I suspect it’s not simple, tbh).

2 Likes

Interesting.

Fwiw, I just checked the FAQ page, which I would have assumed was a “static page,” but the controls are still there.

1 Like

No, the FAQs are still part of the Ember app. By “static page” above, I meant pages that don’t load the Ember app at all. There aren’t many of those

I ran a few quick tests, and the only way I can hit a non-Ember 404 page is if I type a bad URL in the browser by hand. If I click on a link inside Discourse that points to a 404, the rendered page is coming from Ember, and thus it’ll contain the nav controls at the bottom in DiscourseHub. I tested this by sending myself a PM with a link to an inexistent URL.

Adding the controls to the non-Ember 404 page is not simple, that code depends on Ember and device detection, so we can’t simply copy/paste it there.

When you get this 404, can you click on the logo? That should bring you to the Ember app side of things, and all should work fine from then on…

2 Likes

Yep, that’s what I do now. (If I remember before I force-quit, lol)

Thanks for the explanation, by the way.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.