Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#17968 closed defect (bug) (fixed)

deregistered taxonomy makes menu uneditable

Reported by: wpmuguru's profile wpmuguru Owned by:
Milestone: 3.2.1 Priority: normal
Severity: blocker Version: 3.2
Component: Menus Keywords: close
Focuses: Cc:

Description

Steps to reproduce:

  • register a custom taxonomy (either for posts of for a custom post type)
  • add a term under that taxonomy
  • create/edit a post and add the term to the post
  • publish the post
  • edit a nav menu & add the term to the menu
  • deactivate the plugin that registers the taxonomy

Attached is a patch that fixes the issue. However, the is_wp_error check in wp_check_invalid_utf8() might not be the appropriate place to catch/mitigate the second WP error.

I'm technically on vacation for the next couple weeks so I'm not setting the priority, etc.

Attachments (3)

17968.diff (1.1 KB) - added by wpmuguru 12 years ago.
tax-test.php (2.5 KB) - added by wpmuguru 12 years ago.
plugin for testing
17968.2.diff (1.6 KB) - added by nacin 12 years ago.

Download all attachments as: .zip

Change History (10)

@wpmuguru
12 years ago

@wpmuguru
12 years ago

plugin for testing

#1 @wpmuguru
12 years ago

  • Milestone changed from Awaiting Review to 3.2.1
  • Severity changed from normal to blocker

This is still broken in 3.2. I reproduced the error/white screen at the hackfest yesterday. It's not going to be a widesread issue but white screens should be fixed in the next release.

#2 @nacin
12 years ago

This looks hairy and possibly a rabbit hole. Attached is an initial patch that tries to correct some WP_Errors to something scalar.

This should handle taxonomies, but haven't tried disappearing custom post types yet. I think get_post() is more forgiving.

@nacin
12 years ago

#3 @ryan
12 years ago

17968.2.diff fixes the fatal error and seems good. CPTs are still handled properly when deregistered.

#4 @nacin
12 years ago

  • Keywords close added

[18426], [18427].

I see other opportunities for a WP_Error object to make its way into a nav menu item on setup. Not sure if we're done here, though we've avoided the obvious errors.

#5 @nacin
12 years ago

  • Keywords has-patch removed

#6 @azaozz
12 years ago

  • Milestone changed from 3.2.1 to Future Release

No patch for 3.2.1 and suggested close.

#7 @nacin
12 years ago

  • Milestone changed from Future Release to 3.2.1
  • Resolution set to fixed
  • Status changed from new to closed

It's already committed for 3.2.1. Closing. New ticket if someone discovers something new.

Note: See TracTickets for help on using tickets.