Opened 18 years ago
Closed 18 years ago
#4107 closed task (blessed) (fixed)
Tags to categories importer
Reported by: | rob1n | Owned by: | rob1n |
---|---|---|---|
Milestone: | 2.2 | Priority: | high |
Severity: | critical | Version: | |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
Basically, a category to tag importer that *selectively* converts categories. This is because, for example, if you have a Politics category, but have a one-time (maybe two-time) category for Iraq War, the Iraq War is more tag material, whereas the Politics category should stay that way.
So the solution that was reached in #wordpress-dev was to have the user presented with a checklist of categories, and they can choose which categories to import and which not to.
I'm planning to have it done by this weekend (weekend of 4/6).
Attachments (2)
Change History (20)
#2
@
18 years ago
Okay, that's about 80% done. Just the bitwise stuff and count adjustments that need to be made. If you could post some examples of the bitwise stuff, that'd be great. I'm completely ignorant of bitwise functions :\.
I'll tackle the rest tomorrow morning, PST.
#4
@
18 years ago
Todo: Add call to clean_category_cache(). Link to converter from Manage->Categories.
#6
@
18 years ago
- Resolution set to fixed
- Status changed from new to closed
I think the initial work is pretty much done. We can open other tickets in reference to this one, or just reopen this.
#7
@
18 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
To do -- link to converter.
#9
@
18 years ago
I get the "cheatin' uh?" error when I go to use this. Doing a little googling, it seems I may have some permission issues causing that error but everything looks okay.
3 1 gNYC_capabilities a:1:{s:13:"administrator";b:1;}
I'm also using a custom table prefix (gNYC_ instead of wp_), and I put my wp_cat2tags.php file in wp-admin
I'm running the nightly 2.2-bleeding from 4/9/2007
P.S. - This is my first bug here, so please let me know if I can provide more info or if this is the wrong place for this issue.
Thanks
Eric Skiff
#12
@
18 years ago
This may be because I checked for current_user_can('manage_tags') -- not sure if that's set up.
#16
follow-up:
↓ 17
@
18 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Every time I run this it gives me this error, for every category:
Converting category #79... Category doesn't exist!
It also seems to list tags in the checkbox thing, where it should really only lists categories.
#17
in reply to:
↑ 16
@
18 years ago
Replying to matt:
Every time I run this it gives me this error, for every category:
Converting category #79... Category doesn't exist!
I *think* this is because apparently category_exists return the category ID on success, and also it takes the nicename. I'll add in a function local to the importer class that checks based on ID, and returns either boolean true or false.
It also seems to list tags in the checkbox thing, where it should really only lists categories.
This is just my stupid mistake :\.
Misc thoughts. Convert category to tag by setting the type bitfield to TAXONOMY_TAG unless the category is also a link category (link_count > 0). In that case, bitwise or TAXONOMY_TAG into the bitfield. Change rel_type in post2cat from category to tag for all posts with that category id. Copy count to tag_count and then zero out count. Link to the importer from Manage->Categories for better discoverability.