[wp-trac] [WordPress Trac] #13958: Deactivating custom post types/taxonomies breaks nav menus
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 21 20:08:52 UTC 2010
#13958: Deactivating custom post types/taxonomies breaks nav menus
--------------------------+-------------------------------------------------
Reporter: WraithKenny | Owner: filosofo
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.0.1
Component: Menus | Version: 3.0
Severity: normal | Keywords: 2nd-opinion has-patch
--------------------------+-------------------------------------------------
Comment(by westi):
Replying to [comment:3 filosofo]:
> `handle-invalid-object-types.13958.diff` is my suggestion on how to
handle this situation, both for missing post types and missing taxonomies:
>
> * If the menu item is associated with an invalid post or taxonomy type,
the menu item:
> * Gets an error message for its title
> * Gets an empty URL
> * Receives the `post_status` property of "draft."
> * Front-end Walker displays only those menu items that have "publish"
as their `post_status` property.
> * Edit menu Walker does not care whether menu items have "publish" as
their `post_status` property.
> * Upon saving a menu item that is associated with an invalid post or
taxonomy type, `wp_update_nav_menu_item` returns an error object,
effectively deleting the menu item on save.
> * Note that the added error message 'Invalid post type.' is not a new
string.
I am cool will all of this apart from:
Replying to [comment:3 filosofo]:
> * Upon saving a menu item that is associated with an invalid post or
taxonomy type, `wp_update_nav_menu_item` returns an error object,
effectively deleting the menu item on save.
I would rather than they stayed as draft and were visible on the backend
with some message.
I would like us to have a sane behaviour if someone disables a
plugin/theme to test something and then goes back.
Don't want all the menu items that would be affected to disappear in that
use-case.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13958#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list