Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#2179 closed defect (bug) (fixed)

Categories Missing / Removed

Reported by: jcwinnie's profile jcwinnie Owned by:
Milestone: Priority: highest omg bbq
Severity: critical Version: 2.0
Component: Administration Keywords: categories write edit
Focuses: Cc:

Description

From either Write or Edit, some catergories are missing from the selectable with checkbox list of categories, to include Uncategorized. Occurence with either Firefox or Opera on Linux and Win98 systems, so one might assume that someone borked it to undertand it.

Restored functionality would be appreciated by someone using WP daily throughout the day. Thanks.

Change History (10)

#1 @davidhouse
20 years ago

Odd... never heard of anything like that. Could you install the dump environment plugin: http://dev.wp-plugins.org/file/dump_env/trunk/dump_env.php?rev=4235 and tell us the output. The Categories box is set to a maximum height and has a scrollbar so you can get to the lower categories, so could that be your problem?

Can you work out any pattern to which categories are missing? Could you list _exactly_ which categories are in your DB and which ones aren't showing up?

#2 @davidhouse
20 years ago

Actually, it would be better to use the forum for this discussion. Once we've found the root of this problem we can sort out a patch and everything here.

http://wordpress.org/support/topic/53873?replies=1

#3 @jcwinnie
20 years ago

from the forum:

Unable to detect a pattern. I do have a large number of categories, so I will avoid reciting the list. The ones I noticed missing were 1) architecture, 2) housing and 3) shelter.

I also note that when I use performancing, those categories are present and I can select them like any others. Is quite odd.

Is there any sort of index that could have been corrupted? When I used PHP to add those categories to the post, I noted that the category table showed an overload, which disappeared when I optimized the table. Unfortunately, this failed to solved the problem.

Sorry, when I copied the php, uploaded it to the remote server, and activated the plugin, I got garbage at the top of the page until I deactivated the plugin again.

BTW: If you really need to see all of my categories, my profile includes my weblog, which would show my categories in the sidebar. Architecture has 11 posts, housing (9) and shelter (10).

#4 @davidhouse
20 years ago

  • Resolution set to invalid
  • Status changed from new to closed

I think this is a corrupt table problem. Reopen if you find evidence it's not.

#5 @jcwinnie
20 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#6 @jcwinnie
20 years ago

  • Summary changed from Categories Missing to Categories Missing / Removed

Well, the evidence was in the discussion on the support forum. However, lacking understanding it was easier to invalidate the problem.

The evidence?

2.0 (The Ajax (Gee Whizz, Ajax) Component, I would surmise) removes categories that have been added that fail to appear in the checklist because there are less than 20 entries for the category.

Actually, the less than 20 entries screening makes sense from the standpoint of convenience, i.e., "give me, as a first choice, my more common categories."

On the other hand, preventing the use of other categories or actually removing categories that have been added (either with Performancing or manual edit of post2cat) is wrong.

I wonder if, perhaps, someone else less invested in the acceptance of 2.0 and more knowledgable of Ajax (e.g., Does remote hosting matter? Does MySQL version or PHP version matter? etc.) could handle this?

#7 @jcwinnie
20 years ago

Okay, why did 2.0 choose 20 as the magic number for innies v outies?

Hm, I dunno, not being a PHP or Support Maven... An odd coincidence, however, it that in wp_categories, the field category_count is bigint(20). Now if some Dandy new code happened to become confused...

What dandy new code, you ask?

Well, how about in admin-functions.php, the dandy new code that gets the comment Dandy new recursive multiple category stuff.

Now I understand that accepting diversity can be difficult. So it may be that while 1.5 could accept the fact that I chose to use a flat taxonomy rather hierarchical one, 2.0 chokes because the limit is 100 and I have 417 categories, not a nest in the bunch.

I guess I need to learn to autotoggle and let autotoggle, eh?

#8 @jcwinnie
20 years ago

No, 100 wasn't arbitrary. I said 100 because

return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY category_count DESC LIMIT 100");
install.php:$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_count, category_description) VALUES ('0', '".$wpdb->escape(__('Uncategorized'))."', '".sanitize_title(__('Uncategorized'))."', '1', '')")                              ;

Owen? Eric? Anyone that might a...

#9 @jcwinnie
20 years ago

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

Well, I tried changing it. The only change was increasing the limit. First, I tried 200. No explosion, no smoke. Maybe, a few millisecond slower. And, a category that I had wanted to add to a post, which was missing, re-appeared.

Ah-hah!

I have 417 categories, so I changed the limit to 500.

Again, no earth shattering KA-BOOM. Definitely, a few milliseconds slower. Otherwise, nothing bad... so far.

Thus, in the merely mortal words of Ashleigh Brilliant:

"I waited and waited, and, when no word came, I knew it was from you."

For my next trick, should I try drilling through the Earth's mantle or exploding a comet? Decisions, decisions...

#10 @jcwinnie
20 years ago

Oh, I'm so glad the record is here of being ignored, because 2.01 had the same problem; the same solution worked; and, it took less time by referring to this epistle to Mark.

Note: See TracTickets for help on using tickets.