#2421 closed enhancement (wontfix)
Create advanded option to allow posts to have same slug?
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | normal | Version: | 2.0.1 |
Component: | General | Keywords: | bg|has-patch |
Focuses: | Cc: |
Description ¶
I think it'd be nice to be able to have an option to allow posts to have the same slug. Now I realize this can create major problems if permalinks are set up like "/year/postname/" or something, so I suggest that if this becomes a realization, that this new option have no GUI to change it in the admin area. We don't need tons of noobs screwing up their blog by playing with this option. This option would be for advanced users only.
And from poking around, I realize that this may be a bit of work (i.e. the database itself makes sure that post slugs are unique), but I think it'd still be worth it.
Any thoughts on this?
And no, no patch yet as I figured it wasn't worth my time if this ticket ends up getting marked as "wontfix". I am willing to create a patch or help or whatever though if the head honchos think this ticket is worthwhile to invest in.
Pull Requests
- Loading…
Change History (8)
#2
@ Lead Developer
19 years ago
How about enforcing slug "uniqueness" only to the degree that is needed by the current permalink structure?
That is, if the structure has %year%, only make it unique within the year. If %monthnum%, unique within that month. And if %day%, unique within the day (who posts twice in a day with the same slug?)
Easier said than coded, but it would be an elegant solution.
#3
@ Lead Developer
19 years ago
- Keywords bg|has-patch added
- Milestone set to 2.1
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
Patch looks for the presence of %day%, %monthnum% and %year% in the permalink structure.
If %day% is found, uniqueness is made for that day
elseif %month% is found, uniqueness is made for the month
elseif %year% is found, uniqueness is made for the year
else the post slug will be absolutely unique
Okay, well I take back the database thing. Even though the post_name column is set as an index, I forgot that it's gotta be set as unique to do have unique values.
Also, a sweet plugin was pointed out to me. I've activated it and it works like a charm, so this ticket can be ignored if you like as I'm now happy. :)