Page MenuHomePhabricator

Provide a clearer pathway forward for old projects with invalid hashtags
Open, WishlistPublic

Description

This really looks to be ONE bug that has a few different manifestations.

I have a plethora of projects with names along these lines...

BSS [Team]
IMF [Team]
Programming [Dept]
Ratscript [Project]

...and so on. These auto-generated tags, as expected, and worked just fine.

After the Week 52 stable update, however, all projects that had that naming scheme developed the same problem - clicking the project tag would 404. This is also blocking Arcanist from updating any Differential that has that project linked to it.

Meanwhile, any project added after that update, or renamed to the aforementioned naming scheme after the update, does not have this problem. Clicking the PawLIB [Project] tag, for example, successfully goes to https://XXX/tag/pawlib_project/.

For example, clicking the BSS [Team] tag goes to the URL https://XXX/tag/bss_%5Bteam%5D/ . In an attempt to fix it, I renamed the project to BSS and back to BSS [Team], and now clicking the tag goes to the equally invalid URL https://XXX/tag/bss_team/.


Possibly a related issue, anytime you click "Edit Project" on any project, the "Additional Hashtags" field lists all the additional hashtags, plus the auto-generated ones, but strips all spaces and commas out from between them. One has to manually re-insert spaces and commas between the hashtags - clicking "Save Project" will replace all the additional hashtags with one long monster of a conglomeration of hashtags. This issue appeared at the same time.


Duplication Instructions:

This is tricky to duplicate, as it only appears on pre-update projects.

  • Load an instance of Phabricator that is on the stable branch from PRIOR to 2015 Week 52. I was on the latest prior (I pull from stable automatically each morning.)
  • Create a project with the name "Name [Project]" or anything similar.
  • Add some additional hashtags, just for good measure, such as "name" and "nameproject".
  • Save the project, and confirm that clicking on the project tag takes you to a legitimate page.
  • Update to the stable from 2015 Week 52 (or later...I'm on the latest stable, and this is still happening.)
  • Click on the project tag again - it is now 404ing.
  • Edit the project, and note that the hashtags are now muddled. This will happen each time, no matter how often you fix it.
  • Rename the project to "Name", save, rename back to "Name [Project]", save again.
  • Click the project tag yet again - it is now 404ing on a new URL.

You can also create a Differential, add the project from Edit Differential on the website, and then attempt to update the Differential. You will get the error...

Exception
Error parsing field "Projects": The objects you have listed include objects which do not exist (#programming_[dept], #bss_[team]).
(Run with `--trace` for a full exception trace.)

Tech Specs; LAMP Server, Ubuntu 14.04 LTS, fully up-to-date. Running Phabricator, latest stable (as of 16 January 2016 - automatically updates to latest stable each morning.)

Event Timeline

Just a heads up. I hope those duplication instructions are sufficient - this is a very weird one.

epriestley added subscribers: cspeckmim, linan, DaveInTO.

T10150 is probably describing the same issue, but this report is much more detailed.

Also having this issue on our install on all projects with characters like (, ), and *

Solution was to change them in the database, changing in UI didn't seem to save but threw no errors

epriestley renamed this task from Project Tags Pre-2016 Broken to Projects with hashtags that stopped being valid on Oct 12 no longer work after Dec 27.Jan 18 2016, 4:57 PM
  • D15045 fixes the problem with "Additional Hashtags" getting smushed.
  • D15048 fixes a problem where removing old, invalid "Additional Hashtags" could fail.
  • D15047 should fix old hashtags 404'ing.

On Oct 12, we made the rules around hashtag generation more strict (see T9551 for discussion). In particular, Projects previously readily generated hashtags which were not usable in URIs, remarkup, and/or arc diff text. After Oct 12, projects no longer generate these hashtags.

However, they continued to work in some contexts until Dec 27 (D14888), which made querying stricter as well, as a side effect of centralizing query code.

D15047 relaxes the change made by D14888, so these hashtags should continue to work.

I mistakenly believed very few projects were affected by T9551 and that they almost all were broken anyway (e.g., projects with commas in their names, which would never have worked in Reviewers:), and failed to anticipate the impact of the change made by D14888. Although I'd still like installs to eventually move away from hashtags full of characters like ,*[], etc., I'll provide a more gradual pathway forward in the future.

I believe things should be back to normal at HEAD, after D15047.


In an attempt to fix it, I renamed the project to BSS and back to BSS [Team], and now clicking the tag goes to the equally invalid URL https://XXX/tag/bss_team/.
Solution was to change them in the database, changing in UI didn't seem to save but threw no errors

I think I can't reproduce either of these issues. When I make changes to project names, they are reflected in the UI and the new (valid, reduced-character-range) hashtags work properly.

When I rename a project to x, then to x [y], it generates the (fully functional) slug x_y which works correctly. Since Oct 12, it is expected that the natural hashtag for a project named x [y] is x_y.

(I can reproduce deletions of now-invalid "Additional Hashtags" not taking effect, but D15048 should resolve that.)

epriestley triaged this task as Normal priority.
epriestley renamed this task from Projects with hashtags that stopped being valid on Oct 12 no longer work after Dec 27 to Projects with hashtags that stopped being valid on Oct 12 no longer work between Dec 27 and Jan 18.Jan 18 2016, 5:40 PM

I don't mind DCing use of [] in the title, if that's what you were saying we should do...forgive me if I misunderstood. If so, I need something to use as a replacement. We have projects that are Teams, Projects, Departments, and Groups, all which need to be easily queried, and all of which need to be obvious where they belong. Right now, I'm saying "IMF [Team]", "PawLIB [Project]", and so forth. Just saying "IMF Team" or "PawLIB Project" looks entirely too messy and disorganized for our use.

I know I'm not the only person thinking along those lines. If we don't use punctuation symbols in titles, what do you propose we use for separators in that use case?

By the way, I'm more than pleased to never have punctuation in a hashtag, aside from _. I hated the auto-generated hashtags off of those titles anyway.

Once again, if you're not saying we should DC use in project names, then nevermind this whole question. :)

To clarify, you can put anything you want in a project name. Only hashtags have character restrictions. ??? Whales! ??? ~(BIG WHALES)~ is a completely legitimate project name, and will be forever.

Was that unclear, or do you find the new hashtag rules too restrictive?

Ah, I just edited because I realized the difference b/w hashtag and title. I don't like punctuation in hashtags anyway, so all's well. :)

Macro double-facepalm: Cannot brain. Need coffee.

Just a heads up, this looks to be resolved. I've changed all the projects to only have future-valid hashtags, which usually involves my renaming the project to remove the [ ], and then, renaming it back, thereby forcing the automatic hashtag to regenerate properly.

All the same, looks great!

lotsofthumbsup

epriestley lowered the priority of this task from Normal to Wishlist.Feb 7 2016, 12:14 AM

Some day we'll provide some kind of tooling or migration approach here, but this seems stable for now.

epriestley renamed this task from Projects with hashtags that stopped being valid on Oct 12 no longer work between Dec 27 and Jan 18 to Provide a clearer pathway forward for old projects with invalid hashtags.Feb 7 2016, 12:14 AM
epriestley removed epriestley as the assignee of this task.
epriestley moved this task from Future to Far Future on the Projects board.