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

Divi Layout block doesn't work properly within a Lesson #5067

Closed
alexsanford opened this issue Apr 26, 2022 · 1 comment
Closed

Divi Layout block doesn't work properly within a Lesson #5067

alexsanford opened this issue Apr 26, 2022 · 1 comment
Assignees
Labels
[Pri] Normal Can wait for the next release [Type] Bug

Comments

@alexsanford
Copy link
Contributor

Steps to Reproduce

  1. Enable Divi Builder on Course and Lesson post types (Divi > Theme Options > Builder).
  2. Create a new Course, and a new Lesson within that Course. Use the default editor for both.
  3. Add some blocks to the top of the Lesson.
  4. Add a "Divi Layout" block. Create a new layout in the builder.
  5. Notice that the Layout block editor contains the full site layout, including the top menu, footers, comments, etc.
  6. Add some elements, click the "..." button at the bottom, and click "Save & Exit".
  7. In the Lesson editor, notice that the Divi Layout block contains all of the elements of the page.

What I Expected

The Divi Layout block to work like it does for regular posts. The builder should only contain elements that I add manually, and those should display in the block editor after saving.

What Happened Instead

The Divi Layout builder contains all elements from the page, and displays them in the block editor.

Screenshot / Video

https://vimeo.com/700840384/d11f7a0b9e

@alexsanford alexsanford added [Type] Bug [Pri] Normal Can wait for the next release labels Apr 26, 2022
@renatho renatho assigned renatho and unassigned renatho Apr 26, 2022
@renatho
Copy link
Contributor

renatho commented Apr 28, 2022

If the site uses WP 5.9+, the following snippet can be used as a workaround until it's fixed.

add_action(
	'template_redirect',
	function() {
		remove_filter( 'template_include', [ Sensei_Course_Theme_Compat::instance(), 'get_wrapper_template' ] );
	},
	11
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Pri] Normal Can wait for the next release [Type] Bug
Projects
None yet
Development

No branches or pull requests

2 participants