Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#39071 closed defect (bug) (fixed)

Pages created as theme starter content aren't saved if a page is created from Customizer

Reported by: dlh's profile dlh Owned by: westonruter's profile westonruter
Milestone: 4.7 Priority: high
Severity: normal Version: 4.7
Component: Customize Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

To replicate on a "fresh site" running Twenty Seventeen:

  • Open the Customizer, and navigate directly to "Theme Options"
  • Use "Add New Page" to add a page to a front page section
  • Publish the changes

The pages intended to be starter content will still be auto-drafts. The links to those pages will still be in the menu; returning to the frontend and attempting to visit them results in a 404.

Attachments (1)

39071.0.diff (1.5 KB) - added by westonruter 8 years ago.

Download all attachments as: .zip

Change History (9)

@westonruter
8 years ago

#1 @westonruter
8 years ago

  • Keywords has-patch needs-testing added
  • Milestone changed from Awaiting Review to 4.7
  • Owner set to westonruter
  • Priority changed from normal to high
  • Status changed from new to accepted

@dlh excellent catch! The problem is that when starter content is applied, the nav_menus_created_posts setting is initially non-empty. Nevertheless, the nav menus logic is expecting that it would be empty as seen in the insertedAutoDrafts array which would keep track of the newly-created nav menus in the current customizer session. Once saving, it was intended that this would be used to empty out the list but the logic is faulty. We should only be manipulating the one setting and not trying to keep a separate copy around.

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


8 years ago

#3 @dlh
8 years ago

39071.0.diff fixes the issue for me.

#4 @westonruter
8 years ago

  • Keywords commit dev-feedback added; needs-testing removed

#5 @helen
8 years ago

  • Keywords dev-reviewed added; dev-feedback removed

This ticket was mentioned in Slack in #core by helen. View the logs.


8 years ago

#7 @westonruter
8 years ago

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

In 39502:

Customize: Prevent posts/pages imported via starter content from being dropped when adding post/page stubs via nav menus and the dropdown-pages control.

Props westonruter, dlh for testing.
See #38114, #34923.
Fixes #39071.

#8 @westonruter
8 years ago

In 39503:

Customize: Prevent posts/pages imported via starter content from being dropped when adding post/page stubs via nav menus and the dropdown-pages control.

Props westonruter, dlh for testing.
Merges [39502] onto 4.7 branch.
Fixes #39071 for 4.7.

Note: See TracTickets for help on using tickets.