#638 closed defect (fixed)
numeric permalink slugs conflict with id based permalinks
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 0.8.2 |
| Component: | Front-end | Version: | 0.8.1 |
| Severity: | major | Keywords: | has-patch slugs permalinks |
| Cc: |
Description
When a topic or forum is assigned a slug that is numeric, the resulting links to that topic or forum attempt to call by id instead of by slug.
The attached patch corrects this by prepending "s-" to any slug that is calculated to be numeric.
Attachments (2)
Change History (8)
Rather than checking if the slug is numeric to decide to use slugs or not, I have changed bb_repermalink to base it's decision on the mod_rewrite setting instead. This makes sense, because that is how the topic_link and forum_link fundtions operate, and they have to match to not error anyway. Patch included - not be combined with previous patch.
To date, any kind of permalike can be translated on the fly to any other kind of permalink. We know instantly that ?id=5 corresponds to /5, for example. I'd like te keep it that way as much as possible (though if and when we offer fancier permalink possibilities, that clearly won't be tha case).
In particular, a lot of people will probably like to switch to slugs. It'd be nice if they could do that and have their old links redirect automatically.
How about for numeric slugs, we "pre-increment" them by adding a "-1" to the end of the slug?
- Resolution set to fixed
- Status changed from assigned to closed
Why "s-"?
Can we think of something either more meaningful or less ... unmeaningful (is that a word :) )?
slug-username
slug-first-couple-words-of-post
-slug-