osompress / genesis-simple-share

Plugin: Genesis Simple Share
36 stars 16 forks source link

Simple Share prevents the “Widgets” section from appearing in the Customizer #49

Closed nickcernis closed 6 years ago

nickcernis commented 9 years ago

Under certain circumstances, Genesis Simple Share can prevent the Widgets area from appearing in the Customizer.

Steps to reproduce

As discovered by @dreamwhisper:

  1. Activate Genesis Simple Share and the Altitude Pro theme (or any theme with a front-page.php file).
  2. Check that the Genesis → Simple Share settings are set to show on posts:

    genesis_simple_share_settings_ _my_blog_ _wordpress

  3. Set the homepage to use a Static Page in the Customizer:

    customize__loading

  4. Add a Genesis Featured Posts widget to the Front Page 1 area:

    customize__about_-_my_blog

  5. Save the changes in the Customizer and refresh the Customizer page.

    Actual behaviour

The Widgets area will be missing from the Customizer (WordPress 4.2.1) or empty (Rainmaker), and the console displays this error:

Uncaught TypeError: $(...).waypoint is not a function

Missing Widgets area in WP:

customize__loading

Blank Content Areas section in Rainmaker: (same JS error in console)

customize_altitude_pro_theme_ _rainmaker

If you change “front page displays” to “Your Latest Posts”, uncheck “post” in the Simple Share Settings, or remove the Featured Post widget, the Widgets area becomes visible in the Customizer again:

customize__about_-_my_blog

Expected behaviour

The Widgets area should be visible in the Customizer regardless of the widgets used or Static Front Page and Simple Share settings.

Suggested fix

Enqueueing the waypoints JS on line 138 of front-end.php if the Customizer is active resolves this in my tests. (I tested WP 4.2.1; I haven't yet tested Rainmaker.)

Before:

if( $this->is_archive() ) {
    wp_enqueue_script( 'genesis-simple-share-waypoint-js' );
}

After:

if( $this->is_archive() || is_customize_preview() ) {
    wp_enqueue_script( 'genesis-simple-share-waypoint-js' );
}
carasmo commented 8 years ago

Just wondering if this will get fixed soon.

NicktheGeek commented 7 years ago

Genesis Simple Share

carasmo commented 7 years ago

any news on this?

NicktheGeek commented 7 years ago

@carasmo yes! This should be fixed in the 1.1 release. It is being tested, documented, and getting new design assets for the wp.org repo right now but we have a release candidate ready if you'd like to test it.

https://github.com/copyblogger/genesis-simple-share/releases/tag/1.1rc2

dreamwhisper commented 7 years ago

Confirmed x3