Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 3 years ago

#39335 closed defect (bug) (fixed)

Twenty Seventeen: customize-controls.js incorrectly assumes theme_options section is always present

Reported by: westonruter Owned by: davidakennedy
Priority: normal Milestone: 4.7.1
Component: Bundled Theme Version: 4.7
Severity: normal Keywords: has-patch fixed-major
Cc: Focuses:

Description (last modified by westonruter)

Plugins can de-register panels, sections, controls, and settings that are registered by default by core and by themes. As such, themes should use the deferred pattern to interact with such constructs. This is particularly an issue in Twenty Seventeen and now it assumes the theme_options section is present.

Originally reported at ​https://github.com/xwp/wp-customizer-blank-slate/issues/8

Attachments (1)

39335.0.diff​ (1.1 KB ) - added by westonruter 10 years ago.

Download all attachments as: .zip

Change History (8)

#1 @westonruter
10 years ago

  • Description modified (diff)
  • Keywords has-patch added
  • Owner set to davidakennedy
  • Status new → reviewing

#2 @davidakennedy
10 years ago

Thanks for the report and patch @westonruter! This looks good and worked well in my testing.

#3 @davidakennedy
10 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 39623:

Twenty Seventeen: Ensure functions in customize-controls.js don't count on Customizer sections always being present

Before, the code assumed the theme_options section is always present, but it can be removed by plugins. This way, if it is, no JavaScript errors occur.

Props westonruter.

Fixes #39335.

#4 @westonruter
10 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closed → reopened

Not 100% sure if this is the right procedure for bundled themes, but re-opening for committing into 4.7 branch.

#5 @dd32
10 years ago

Not 100% sure if this is the right procedure for bundled themes, but re-opening for committing into 4.7 branch.

FTR, yes, Twenty Seventeen fixes will need merging to the 4.7 branch too. @davidakennedy I'm happy to take care of that in one of my merge-storms.

#6 @westonruter
10 years ago

This commit [39623] was merged to the 4.7 branch in [39632] by @pento, though it had a typo in the ticket reference.

#7 @swissspidy
10 years ago

  • Resolution → fixed
  • Status reopened → closed
Note: See TracTickets for help on using tickets.