Opened 15 years ago
Closed 15 years ago
#13119 closed defect (bug) (fixed)
Duplicate slug not possible for separate items
Reported by: | solostream | Owned by: | dd32 |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | blocker | Version: | 3.0 |
Component: | Permalinks | Keywords: | dev-feedback |
Focuses: | Cc: |
Description
I have recently come across a bug in WordPress 3.0-beta1 that has happened on two customers' sites. Apparently it is not possible to have the same term for an item be used twice, unlike previous versions. For instance, if you wanted to have a category slug named 'featured' and a tag named 'featured' it is not possible to do so. The first item that was created is assigned the slug 'featured' while the second one is assigned the slug 'featured-2'. This doesn't play nicely with our themes as the tag 'featured' needs to be used for a featured slider.
Steps to consistently reproduce the problem:
- Add a category called 'featured'. Leave all other fields blank.
- Add a tag called 'featured'. Again, leave all other fields blank.
- Look at tag slug -- it will be 'featured-2' instead of 'featured'
- Repeat steps 1-3 for another category/tag name to see same results
The above bug is not related to any plugins or theme being used. It is a part of WP Admin and needs to be corrected.
How to fix:
- Like previous versions of WordPress, allow the ability to have two separate items to share the same slug (e.g., category and tag)
Attachments (1)
Change History (26)
#2
in reply to:
↑ 1
@
15 years ago
Replying to scribu:
See #10712
Thanks for the response, but it doesn't look like the bug you mentioned is the same thing. What I noticed is that the "-2" is appended to the slug if the same name is being used by another item, whereas issue #10712 is related to the parent category name being a part of the sub-category title.
In addition, the particular issue I submitted does not affect previous WordPress versions, including the latest stable release (2.9.2). It is only an issue when 3.0-beta1 is used, which for whatever reason is the version some hosts are upgrading their customers to for their blogs.
#3
@
15 years ago
- Milestone 3.0 deleted
- Resolution set to duplicate
- Status changed from new to closed
Right, then it's a duplicate of #12911
#4
@
15 years ago
- Milestone set to 3.0
- Resolution duplicate deleted
- Status changed from closed to reopened
I take that back.
It is however caused by this changeset: [13087]
#8
@
15 years ago
- Component changed from Administration to Permalinks
- Keywords dev-feedback added; category tag duplicate item term removed
Does this behavior need to be reverted or is it working the way it was intended to work?
#9
@
15 years ago
- Severity changed from major to blocker
Terms in different taxonomies should be able to share a slug. That's the whole point of having canonical terms.
#10
@
15 years ago
That said, I can't reproduce this problem with current trunk. Tag and Category map to the same term_id with the same slug. Can anyone else reproduce this?
#13
@
15 years ago
I can reproduce this using tags and categories, or using a custom taxonomy, as long as a category exists with a given term slug i cannot create any new terms under any taxonomy using that same slug.
A term with the slug provided already exists.
Is all i see, i don't even get the appended terms, ie. term-2, term-3, etc..
#16
@
15 years ago
Version - 3.0 Rev 14772 (current at time of writing)
Choose a category, any you have existing, mine had posts (not sure that matters), open up a term management page for any taxonomy, category, tag or a custom one, and attempt to create a term with a slug that matches that of the existing one.
In my case, i have around 25 random categories(test environment) and the category is called "Assigned" with a slug of "assigned" ..
I've even tested a term under a Page taxonomy and still received the previously mentioned duplicate term message.
Multisite is not enabled on my installation.
Have been running SVN(this install started at 3.0 though) for a while, but i can wipe and start clean if you'd like me to test from a clean install.
#17
@
15 years ago
Sorry i've just realised my error, been reading those duplicate term tickets too much recently and realised i've tacked onto a permalink component ticket, apologies, this is a misplaced report.
Disregard, and i'll respond in the appropriate tickets (multi-tasking too many things and didn't spot the oversight till now).
Apologies all.
#19
@
15 years ago
I could reproduce this but only that the UI behavior is different between 2.9 and 3.0.
- Create a category with the name "Category" and slug "term".
2a. Create a tag with the name "term" and don't provide a slug. In 3.0, you get "term-2" as a slug.
2b. Create a tag with the name "term" and slug "term." You'll get an error in 3.0.
In both cases in 2.9, a row with the name "Category" and slug "term" gets added to the grid, which obviously goes away on refresh as it never existed, that's only what we returned via AJAX however.
#20
@
15 years ago
If you create a tag and then a category with the same name, the category will get -2. If you create a category and then a tag, both get the same slug and ID.
See #10712