Skip to:

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#638 closed defect (fixed)

numeric permalink slugs conflict with id based permalinks

Reported by: sambauers Owned by: sambauers
Milestone: 0.8.2 Priority: high
Severity: major Version: 0.8.1
Component: Front-end Keywords: has-patch slugs permalinks


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)

numeric-slugs-fix.patch (593 bytes) - added by sambauers 11 years ago.
bb_repermalink-numeric-slugs-fix-build817.patch (894 bytes) - added by sambauers 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 @sambauers
11 years ago

  • Status changed from new to assigned

#2 @mdawaffe
11 years ago

Why "s-"?

Can we think of something either more meaningful or less ... unmeaningful (is that a word :) )?




#3 @sambauers
11 years ago

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.

#4 @mdawaffe
10 years ago

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?

#5 @mdawaffe
10 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [847]) make numeric slugs non-numeric. Fixes #638

#6 @mdawaffe
10 years ago

  • Milestone changed from 1.0 to 0.8.2
Note: See TracTickets for help on using tickets.