@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.

Fix project page 404 after rename and removing new name from alias slugs

Summary:
When renaming a project to a slug already listed under Additional hashtags and explicitly also removing that to-become slug, accessing the project via the URL `/tag/projectname/` returned a 404 until someone added the current project name explicitly under "Additional hashtags" again.

In that case, do not remove the alternative hashtag to avoid the 404.

Closes T15636

Test Plan: See steps in https://we.phorge.it/T15636

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

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

Maniphest Tasks: T15636

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

+6
+6
src/applications/project/editor/PhabricatorProjectTransactionEditor.php
··· 295 295 } 296 296 297 297 public function removeSlugs(PhabricatorProject $project, array $slugs) { 298 + // Do not allow removing the project's primary slug which the edit form 299 + // may allow through a series of renames/moves. See T15636 300 + if (($key = array_search($project->getPrimarySlug(), $slugs)) !== false) { 301 + unset($slugs[$key]); 302 + } 303 + 298 304 if (!$slugs) { 299 305 return; 300 306 }