- This topic has 7 replies, 3 voices, and was last updated 4 years, 4 months ago by
Tom.
-
AuthorPosts
-
February 1, 2022 at 8:18 am #2101523
Math
Hi,
After today’s update (GeneratePress 3.1.2) the block editor is now displaying the post content in (almost) full width. Previously, it was contained and you could tell the difference between full width and contained widths.
The actual post when Previewing or Publishing works as intended. It’s only in the editor.
Why was it changed?
Thank you.
February 1, 2022 at 9:51 am #2101637David
StaffCustomer SupportHi there,
WP 5.9 stopped the Full Width block options being displayed in the Post Editor. Which was patched in 3.1.2.
So the only change should be related to blocks with that option selected.Are you seeing a change elsewhere ?
February 1, 2022 at 10:04 am #2101657Math
Hi David,
On one site I updated to the latest WP 5.9 and latest GP 3.1.2, and everything is showing up full width in Post. See below.
https://www.dropbox.com/s/cp7t2mihvha5htu/Capture.PNG?dl=0On the other site, I updated to the latest WP 5.9, but didn’t update to the latest GP and the Post width is contained as it had been previously. See below.
https://www.dropbox.com/s/qqdaxvo9rqkez5g/Capture2.PNG?dl=0Thank you.
February 1, 2022 at 10:23 am #2101686David
StaffCustomer SupportWould it be possible to get temporary admin access to the problem site so we can take a look ?
February 1, 2022 at 10:42 am #2101716Math
Login info provided.
February 1, 2022 at 3:48 pm #2101995Tom
Lead DeveloperLead DeveloperHi there,
Sorry about this – looks like a bug when setting the content width in a Layout Element and our 3.1.2 update.
As a quick fix until we release 3.1.3, you can do this:
add_action( 'enqueue_block_editor_assets', function() { global $generate_elements; foreach ( $generate_elements as $element ) { if ( 'layout' === $element['type'] ) { $content_width = get_post_meta( $element['id'], '_generate_content_width', true ); if ( $content_width ) { $admin_css = 'body .wp-block{max-width: ' . absint( $content_width ) . 'px !important;}'; wp_add_inline_style( 'generate-block-editor-styles', $admin_css ); } } } }, 100 );Let me know if that works or not 🙂
February 2, 2022 at 8:06 am #2102857Math
Hi Tom,
Seems to be working. Thanks for addressing this issue quickly!
February 2, 2022 at 9:17 pm #2103437Tom
Lead DeveloperLead DeveloperNo problem – sorry for the inconvenience!
-
AuthorPosts
- You must be logged in to reply to this topic.