Page MenuHomePhabricator

Always automatically generate Phame slugs
ClosedPublic

Authored by epriestley on Dec 15 2015, 9:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 3:21 PM
Unknown Object (File)
Thu, Dec 19, 11:48 AM
Unknown Object (File)
Fri, Dec 13, 7:03 AM
Unknown Object (File)
Thu, Dec 12, 10:33 PM
Unknown Object (File)
Mon, Dec 9, 1:56 AM
Unknown Object (File)
Tue, Dec 3, 2:55 PM
Unknown Object (File)
Tue, Dec 3, 2:47 AM
Unknown Object (File)
Sun, Dec 1, 12:13 PM
Subscribers
None

Details

Summary

Fixes T9995. I think letting users customize slugs is not a hugely compelling as a product feature, and this fixes the issue with slugs that have "/" characters in them and makes the move to EditEngine easier since I don't have to deal with the weird JS thing.

Instead, just generate slugs automatically. No more JS, no more separate field, things automatically update if you rename a blog, and now that URIs have IDs in them the old URI will still work after a rename.

Test Plan
  • Applied migration.
  • Created new posts.
  • Edited existing posts.
  • Visited various posts.
  • Created a post with a bunch of "/" in the title, things still worked fine.

Diff Detail

Repository
rP Phabricator
Branch
phame1 (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 9583
Build 11460: Run Core Tests
Build 11459: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Always automatically generate Phame slugs.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
chad added inline comments.
src/applications/phame/storage/PhamePost.php
144

awwyiss2

This revision is now accepted and ready to land.Dec 15 2015, 9:42 PM

Actually, I'm going to leave the column in place for now, and just remove the unique key and NOT NULL on it.

If we get rid of the data entirely, it becomes very difficult to write a "keep old URLs working mostly-OK" hack, and it's possible that we'll want to do that as an option for some installs if we have other "sleeper" installs using Phame in weird ways. Just leaving the data in the database for now doesn't cost us much and leaves that option open.

epriestley edited edge metadata.
  • Slightly more conservative patch: keep the data around, just never read it.
This revision was automatically updated to reflect the committed changes.