Page MenuHomePhabricator

Exception when moving Phriction document into place of old one
Closed, ResolvedPublic

Description

In Phriction when I have two documents, A and B, and I perform the following steps:

  • Delete or move B
  • Attempt to move A to B

I get the following exception:

pasted_file (419×1 px, 52 KB)

Event Timeline

hach-que assigned this task to epriestley.
hach-que raised the priority of this task from to Needs Triage.
hach-que updated the task description. (Show Details)
hach-que added a project: Phriction.
hach-que added a subscriber: hach-que.

This:

https://secure.phabricator.com/differential/diff/30637/

...fixes the immediate issue, but then we hit something deeper down:

Screen Shot 2015-05-07 at 6.15.04 AM.png (655×1 px, 158 KB)

...so this isn't trivial to resolve correctly.

epriestley added subscribers: eadler, jhurwitz.

T8011 is at least superficially the same as this, and probably the same at the root.

epriestley triaged this task as Normal priority.May 7 2015, 1:45 PM
jhurwitz added a project: Restricted Project.Jun 3 2015, 9:28 PM

I think fixing this is basically removing the unique constraint on the "slugs" table in Phriction, and then using application logic to make sure that there can be only one active page with a given slug at any time.

  • remove unique constraint on "slugs" table in Phriction
  • double check that create / move don't let you clobber any non-deleted, non-stub pages
  • change loading logic to prefer active documents first, next by most recently updated
  • change history page to show the active document first, next by most recently updated
    • e.g. "page active" version history followed by "page deleted that was here" version history
  • make sure "revert" workflow works right in these delete + move scenarios

Sound right-ish?