WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#33334 closed defect (bug) (duplicate)

(Shared term) Nav menu cleared on save

Reported by: TannerMirabel Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: Menus Keywords:
Focuses: Cc:

Description

We ran into this bug with some earlier installations where there were shared taxonomy terms.

I have reproduced this in WP 4.2.4 network installation.

Steps to reproduce:

  1. In your database, have terms that are shared between multiple taxonomies with one taxonomy being nav_menu.
  2. Populate said menu and save changes.

Expected result would be that the changes were updated to the menu but instead the menu items disappear.

I suspect this is because the menu's term_id is changed and its items are not coupled with the new ID.

If this is the case, it could be fixed beforehand by splitting the terms with something like this: https://github.com/jjeaton/wp-find-shared-terms. It tried this on a test environment and it seemed to work nicely.

In our case, we have dozens of network installations with dozens of sites in each so it's not possible for us to go through each site to detect and fix menus with possible shared taxonomies.

Change History (2)

#1 @dd32
6 years ago

  • Milestone changed from Awaiting Review to 4.3

Shifting to 4.3 for review.

#2 @ocean90
6 years ago

  • Milestone 4.3 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 4.2

Hello TannerMirabel, wecome to Trac.

Thanks for your report but we already have a ticket for this issue, see #33187. I'm going to close this as a dup of #33187 because it has some more insight.

Note: See TracTickets for help on using tickets.