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)
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
Unknown Object (File)
Sun, Dec 1, 5:52 AM
Unknown Object (File)
Mon, Nov 25, 7:00 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
146

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.