New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: HTTP Concat for Gutenberg #957

Merged
merged 8 commits into from Aug 10, 2018

Conversation

Projects
None yet
2 participants
@justnorris
Contributor

justnorris commented Aug 10, 2018

The Why

HTTP Concat plugin currently breaks Gutenberg Admin. This is a hot fix that will selectively disable HTTP Concat in the admin when editing posts that have Gutenberg enabled.

This change will not affect people that have defined VIP_GO_DISABLE_RAMP as true.

Testing

  1. Activate Gutenberg on a fresh VIP GO Installation
  2. Add this to the active theme functions.php:
wpcom_vip_load_gutenberg( [ 'post_types' => [ 'page' ] ] );
  1. Reload the Page edit page twice, observe a white screen of death ( JavaScript errors in console )
  2. Apply this patch
  3. Problem fixed - Gutenberg should now work in "Add new Page".
  4. Visit "Add new post" - observe concatenated scripts because Gutenberg is only enabled in "page" post type.

@justnorris justnorris requested a review from mjangda Aug 10, 2018

justnorris added some commits Aug 10, 2018

gutenberg_ramp_load_gutenberg( $criteria );
if ( ! has_action( 'admin_init', 'wpcom_vip_disable_gutenberg_concat' ) ) {

This comment has been minimized.

@mjangda

mjangda Aug 10, 2018

Member

Why do we need this check?

This comment has been minimized.

@justnorris

justnorris Aug 10, 2018

Contributor

We don't :). Ill remove this.

justnorris and others added some commits Aug 10, 2018

Spaces!
And remove unnecessary params for `add_filter`.
Fix the Gutenberg “will load” condition
Checking for `true === $gutenberg_ramp->load_gutenberg` isn’t enough because it may lead to false positives when Gutenberg plugin is activated through the dashboard.

justnorris and others added some commits Aug 10, 2018

@mjangda

:gutenberg: :gutenberg: :gutenberg:

@mjangda mjangda merged commit c3db17b into master Aug 10, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mjangda mjangda deleted the fix/concat-gutenberg branch Aug 10, 2018

@mjangda

This comment has been minimized.

Member

mjangda commented Aug 10, 2018

r116279-deploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment