Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#49331 new defect (bug)

'output' Taxonomy Slug Crashes Menu

Reported by: nekokun's profile nekokun Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3.2
Component: Menus Keywords:
Focuses: Cc:

Description

If I create a custom taxonomy with its slug as 'output' the Menus in the admin area disappear as well as on the frontend.
The 'output' is not listed as a reserved term here: https://codex.wordpress.org/Reserved_Terms

Change History (1)

#1 @SergeyBiryukov
5 years ago

  • Component changed from Taxonomy to Menus

Hi there, welcome to WordPress Trac! Thanks for the report.

I was able to reproduce the issue. It happens because wp_get_nav_menu_items() has an `output` parameter, which is passed to get_posts() along with other parameters, and conflicts with the taxonomy of the same name.

A couple of ways to resolve this:

  • Only pass the parameters get_posts() actually accepts, i.e. exclude output and output_key.
  • Add output to the list of reserved terms. Related: #11531, #12929, #18263, #31154, #31155.
Last edited 5 years ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.