WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#40277 closed defect (bug) (fixed)

Adding page created with the dropdown-pages settings to menu creates Custom Link instead of Page

Reported by: danielmilner Owned by: westonruter
Milestone: 4.7.4 Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

How to recreate the issue in Customize:

  1. Create a new page using a dropdown-pages setting that has the allow_addition option.
  2. Switch to the menu panel, and add this newly created page to a Menu. (It shows up as a Page)
  3. Save changes and exit the Customize screen.

View the menu on the front-end. The menu item was added to the menu as a Custom Link instead of a Page.

Attachments (1)

40277.0.diff (612 bytes) - added by westonruter 4 months ago.

Download all attachments as: .zip

Change History (9)

#1 @danielmilner
4 months ago

This only happens during the Customize session where the Page was created. If you Save/Exit and return to the Customize screen, the menu item will be added correctly.

@westonruter
4 months ago

#2 @westonruter
4 months ago

  • Keywords has-patch needs-testing added
  • Milestone changed from Awaiting Review to 4.7.4
  • Version changed from 4.7.3 to 4.7

@danielmilner good catch. Would you give 40277.0.diff a try? Looks like we got the values for type and object reversed.

#3 @lukecavanagh
4 months ago

40277.0.diff seems to fix the issue, when through the same steps and added the newly created page to an existing menu in the Customizer, when checking the site front-end the page added to the main menu was a page and not a custom link.

#4 @danielmilner
4 months ago

I concur with @lukecavanagh. 40277.0.diff appears to fix the issue.

#5 @westonruter
4 months ago

  • Keywords commit added; needs-testing removed
  • Owner set to westonruter
  • Status changed from new to accepted

#6 @westonruter
4 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 40380:

Customize: Fix reversal of nav menu item's type and object properties for page stub added in customizer.

Amends [38906].
See #38164.
Fixes #40277.

#7 @westonruter
4 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for consideration in 4.7.4

#8 @swissspidy
4 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 40383:

Customize: Fix reversal of nav menu item's type and object properties for
page stub added in customizer.

Amends [38906].
See #38164.
Fixes #40277.

Merges [40380] to the 4.7 branch.

Note: See TracTickets for help on using tickets.