[Plugin: WordPress MU Sitewide Tags Pages] Random Numeric Categories being Added
We have one MU install that works well and one MU install where the sitewide tags plugin adds the correct tags to the sitewide tags blog, but also creates random categories as well when importing posts form child blogs.
For example, user creates a blog post on their blog with tag of “flowers”. Sitewide tags plugin works as it should adding the new “flowers” tag to the sitewide tags blog, but it also creates a new category of “7” or “14” or “76” or some other random number category for the post. The numeric category doesn’t show up on the sitewide tags blog, but shows up in dashboard categories and the new post is labelled with it as well. The original user’s blog does not have the numeric category.
Anyone else have this experience or any ideas on a fix?
Correction: number of posts does not correlate to number… was looking at the slug on accident…
Try the development version. Did you by any chance copy the blog this is happening on into your MU site using phpmyadmin or any way but not the importer?
That causes problems with the global categories/tags stuff. I’ve opened a ticket to fix that but there’s a temporary fix in the plugin while we sort it out.
Donncha, the site was not copied, the tags page is on the root of the domain and simply populates tags from all client sites / mapped sub-domains on the install.
I may have falsely concluded that the issue is occurring when users do an xml import on their own sites…. in retrospect, there are way more categories with numbers then there are xml imports as there have only been 3 or 4 xml imports total on the install, but there are 5 to 10 new numeric categories added every few days.
Ok, does the number that is inserted as the category in the tags blog match the category ID of any of the categories of the same post in the original blog?
I have encountered this problem as well. We run a complex WPMU site and I haven’t had a lot of time to investigate, but I believe it may be happening when there is some sort of conflict between slugs of categories that are children of other categories.
In WPMU, if you have two blogs and create a category in each with the same nicename, they will end up with the same category ID; presumably so that cross-blog queries of a category are more straightforward. For example:
Let’s say we have a new WPMU install with two blogs, Blog A and Blog B, and a sitewide tags blog, Blog T.
Blog A has a category called ‘Category Alpha’, a slug of category-alpha, and an category ID of 1. Blog B has a category called ‘Category Alpha’, a slug of category-alpha, and a category ID of 1.
However, if the two categories have the same nicename but the category hierarchy (or you could call it ‘path’) is different, then they end up with different category IDs. For example:
Blog A has a category called ‘Category Beta’, a slug of category-beta, and a category ID of 2. Blog B has a parent category called ‘Category Gamma’ (slug: category-gamma), a child of that category called ‘Category Beta’ (slug: category-beta), a path of category-gamma/category-beta, and category IDs of 3 (for Gamma, since it would have been created first) and 4 (for Beta, created second).
Now, even when both Blog A and Blog B have two categories with the same name (‘Category Beta’) and same slug (category-beta), they have different IDs (2 versus 4) because their paths are different (category-beta vs. category-gamma/category-beta).
The problem comes in here: the plugin doesn’t seem to preserve category hierarchy when copying the categories over to the sitewide tags blog, so you potentially end up with a big WP no-no: two categories on the same blog, with different IDs, but the same path. Blog A‘s ‘Category Beta’ (category ID 2) and Blog B‘s ‘Category Beta’ (category ID 4) both get imported into Blog T and both with a path of simply ‘category-beta’. Uh oh.
Somewhere along the line, probably as a last-ditch effort to Stop the Universe From Exploding™, the categories’ nicenames and slugs are set to their IDs (a category named ‘1’, a slug of ‘1’, and an ID of ‘1’, resulting in what seem to be a bunch of ‘random numbered categories.’
I could be totally off on this, but that’s my hypothesis. Hopefully it wasn’t too confusing. I imagine it could be solved rather easily by keeping the original category structure on the sitewide blog.
On further inspection, I just noticed that the names and slugs of these numbered categories actually do not match the IDs, but they’re close. In any case, they still seem to be generated by WordPress as a conflict resolution.
does any one resolved this issue? I have some sort of problem like this. Whenever any one the main blog or the child blog adds a new category two new categories, the default one, “uncategorized” is created and also it shows up in the main blog causing very annoying.
- The topic ‘[Plugin: WordPress MU Sitewide Tags Pages] Random Numeric Categories being Added’ is closed to new replies.