Page MenuHomePhabricator

Alternative hashtag of milestone has no primary slug, thus project URL redirects to 404 /tag//
Open, LowPublic

Description

https://phabricator.wikimedia.org/tag/collaboration-maps/ redirects to https://phabricator.wikimedia.org/tag// .

This is a real hashtag for a real milestone (https://phabricator.wikimedia.org/project/manage/3219/) (without a board so far, not sure if that matters).

Tags that simply do not exist behave differently (https://phabricator.wikimedia.org/tag/does-not-exist).

Upstream: https://we.phorge.it/T15547

Event Timeline

Mattflaschen-WMF renamed this task from Tag URL for milestone without board causes weird 404 rediret to Tag URL for milestone without board causes weird 404 redirect.Jan 31 2018, 11:16 PM

Hmm i was suspecting it may have been we already had a project called Maps (https://phabricator.wikimedia.org/project/edit/1127/) so I renamed it, but that didn't seem to fix it either

Aklapper renamed this task from Tag URL for milestone without board causes weird 404 redirect to Tag URL for milestone without board causes weird 404 redirect to https://phabricator.wikimedia.org/tag//.Feb 1 2018, 11:30 AM
Aklapper triaged this task as Lowest priority.Aug 5 2020, 1:51 PM

In my understanding this happens if the primarySlug for the milestone or subproject is not set in the DB, because how to decide which project to display if two subprojects with different parent projects share the same names. Whether a board exists or not should be unrelated.

However, how to set a primarySlug from the UI remains a mystery to me. Some milestones have one, many don't.

mysql:phstats@m3-slave.eqiad.wmnet [phabricator_project]> SELECT p.id, p.name, p.primarySlug, s.slug, p.hasWorkboard, p.milestoneNumber FROM phabricator_project.project p INNER JOIN phabricator_project.project_slug s WHERE p.milestoneNumber >= 1 AND p.hasWorkboard = 1 AND p.parentProjectPHID IS NOT NULL AND s.projectPHID = p.phid AND (s.slug LIKE "%ollaboratio%" OR p.primarySlug LIKE "%ollaboratio%" OR p.name LIKE "%ollaboratio%");
+------+--------------------+-------------+--------------------+--------------+-----------------+
| id   | name               | primarySlug | slug               | hasWorkboard | milestoneNumber |
+------+--------------------+-------------+--------------------+--------------+-----------------+
| 3219 | Collaboration-Maps | NULL        | collaboration-maps |            1 |               4 |
+------+--------------------+-------------+--------------------+--------------+-----------------+
1 row in set (0.011 sec)
Aklapper renamed this task from Tag URL for milestone without board causes weird 404 redirect to https://phabricator.wikimedia.org/tag// to Milestone project tag URLs with alternative hashtag set but without a primary slug redirect to https://phabricator.wikimedia.org/tag//.Feb 13 2021, 11:05 AM
Aklapper removed a subscriber: Mattflaschen-WMF.
Aklapper raised the priority of this task from Lowest to Low.Jul 10 2023, 4:19 PM
Aklapper edited projects, added Phabricator (Upstream), Upstream; removed Phabricator.
  • I can reproduce this in upstream.
  • Still an issue nowadays per SELECT p.id, p.name, p.primarySlug, s.slug, p.hasWorkboard, p.milestoneNumber FROM phabricator_project.project p INNER JOIN phabricator_project.project_slug s WHERE p.milestoneNumber >= 1 AND p.parentProjectPHID IS NOT NULL AND s.projectPHID = p.phid AND p.primarySlug IS NULL ORDER BY p.dateCreated; - typeahead works but URLs do not.
  • Only change mentioning primarySlug that git log offers is https://secure.phabricator.com/D14825
Aklapper moved this task from Backlog to Reported Upstream on the Upstream board.
Aklapper moved this task from Backlog to Upstreamed on the Phabricator (Upstream) board.

I believe this might be a duplicate of T224662

...while the workaround other there did not work, hmm. Let's retest after we've pulled and deployed the upstream fix

Aklapper renamed this task from Milestone project tag URLs with alternative hashtag set but without a primary slug redirect to https://phabricator.wikimedia.org/tag// to Alternative hashtag of milestone has no primary slug, thus project URL redirects to 404 /tag//.Fri, Mar 29, 8:17 AM