WordPress.org

Make WordPress Core

Opened 10 months ago

Last modified 10 months ago

#49331 new defect (bug)

'output' Taxonomy Slug Crashes Menu

Reported by: 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
10 months 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 10 months ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.