Skip to content
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

Layouts Block: Prevent Double Page Builder when in Dev Mode #1237

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

AlexGStapleton
Copy link
Member

This PR prevents a single Layouts Block from rendering PB twice, preventing changes in "dev mode". This PR improves Layout Block unmounting so it also has positive knock-on effects outside of dev mode.

Dev mode requires at least the following added to wp-config.php:

define( 'WP_DEBUG', true );

It may also require one of, or both of, the following (I get inconsistent results):

define( 'WP_ENVIRONMENT_TYPE', 'local' );
define( 'SCRIPT_DEBUG', true );

double

@AlexGStapleton AlexGStapleton self-assigned this Nov 19, 2024
@AlexGStapleton
Copy link
Member Author

1e29f03 resolve a timing issue with previews where the preview HTML won't display correctly. This has always been a potential issue but it's more pronounced due to the (intentional - it's a React Strict mode feature to help catch bugs) mount, unmount, and then remount that can occur when not in production.

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

Successfully merging this pull request may close these issues.

1 participant