[wp-trac] [WordPress Trac] #13344: Nav Menu slugs are incremented on each save
WordPress Trac
wp-trac at lists.automattic.com
Tue May 11 15:11:27 UTC 2010
#13344: Nav Menu slugs are incremented on each save
--------------------------+-------------------------------------------------
Reporter: ryan | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Menus | Version:
Severity: blocker | Keywords:
--------------------------+-------------------------------------------------
Saving a nav menu generates queries like this:
{{{
Query: SELECT t.*, tt.* FROM wp_trunk_terms AS t INNER JOIN
wp_trunk_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy =
'nav_menu' AND t.name = 'Main' LIMIT 1
Time: 0.000452995300293
Caller: wp_update_nav_menu_object, get_term_by
Query: SELECT term_id FROM wp_trunk_terms WHERE slug = 'main'
Time: 0.00223398208618
Caller: wp_update_nav_menu_object, wp_update_term
Query: SELECT term_id FROM wp_trunk_terms as t WHERE t.slug = 'main'
Time: 0.000410079956055
Caller: wp_update_nav_menu_object, wp_update_term, wp_unique_term_slug,
is_term
Query: SELECT slug FROM wp_trunk_terms WHERE slug = 'main'
Time: 0.000195980072021
Caller: wp_update_nav_menu_object, wp_update_term, wp_unique_term_slug
Query: SELECT slug FROM wp_trunk_terms WHERE slug = 'main-2'
Time: 0.000192880630493
Caller: wp_update_nav_menu_object, wp_update_term, wp_unique_term_slug
Query: SELECT slug FROM wp_trunk_terms WHERE slug = 'main-3'
Time: 0.000185012817383
Caller: wp_update_nav_menu_object, wp_update_term, wp_unique_term_slug
Query: UPDATE `wp_trunk_terms` SET `name` = 'Main', `slug` = 'main-3',
`term_group` = 0 WHERE `term_id` = 6103
Time: 0.000320911407471
Caller: wp_update_nav_menu_object, wp_update_term
Query: SELECT tt.term_taxonomy_id FROM wp_trunk_term_taxonomy AS tt INNER
JOIN wp_trunk_terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy =
'nav_menu' AND t.term_id = 6103
Time: 0.000339984893799
Caller: wp_update_nav_menu_object, wp_update_term
Query: UPDATE `wp_trunk_term_taxonomy` SET `term_id` = 6103, `taxonomy` =
'nav_menu', `description` = '', `parent` = 0 WHERE `term_taxonomy_id` = 69
Time: 0.000323057174683
Caller: wp_update_nav_menu_object, wp_update_term
Query: SELECT autoload FROM wp_trunk_options WHERE option_name =
'nav_menu_children'
Time: 0.000581979751587
Caller: wp_update_nav_menu_object, wp_update_term, clean_term_cache,
delete_option
}}}
The next save bumps the slug back to 2. Subsequent saves bounce between 2
and 3. Global terms are off.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13344>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list