@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Guides: Show 404 when visiting a guide that does not exist

Summary:
Visiting a guide that does not exist causes an exception to be thrown.
This exception isn't handled, which is poor UX.

Test Plan:
* Visit http://phorge.localhost/guides/test/ and observe an error message
* Apply this change
* Visit http://phorge.localhost/guides/test/ and see a regular 404 page

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26148

+6 -1
+6 -1
src/applications/guides/controller/PhabricatorGuideModuleController.php
··· 13 13 $key = key($all_modules); 14 14 } 15 15 16 + $module = idx($all_modules, $key); 17 + 18 + if (!$module) { 19 + return new Aphront404Response(); 20 + } 21 + 16 22 $nav = $this->buildSideNavView(); 17 23 $nav->selectFilter($key.'/'); 18 24 19 - $module = $all_modules[$key]; 20 25 $content = $module->renderModuleStatus($request); 21 26 $title = $module->getModuleName(); 22 27