Page MenuHomePhabricator

Always automatically generate Phame slugs
ClosedPublic

Authored by epriestley on Dec 15 2015, 9:41 PM.
Tags
None
Referenced Files
F13234372: D14792.diff
Tue, May 21, 3:20 AM
F13212089: D14792.diff
Fri, May 17, 6:22 AM
F13195695: D14792.diff
Sun, May 12, 10:34 PM
F13178411: D14792.diff
Wed, May 8, 8:24 PM
Unknown Object (File)
Sat, May 4, 4:21 PM
Unknown Object (File)
Thu, Apr 25, 2:17 AM
Unknown Object (File)
Apr 23 2024, 3:12 AM
Unknown Object (File)
Apr 8 2024, 10:15 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
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.