-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Previously inserted Cover Blocks no longer display at their correct width in editor #18229
Comments
Hey @maddisondesigns Anthony. |
@paaljoachim This is still an issue. Looking at one of my old pages... This is what it looks like in the browser. This is the Code View of the three Cover Blocks. This is the normal width block in the Visual Editor. This is the Cover Block set to Wide. This is the Cover Block set to Full. You can see that none of the options on the Block Toolbar (for Wide or Full alignment) are selected. |
Hey @maddisondesigns Anthony I am using WordPress 5.7.1. Twenty Twenty One. Gutenberg plugin 10.4 RC. I am also seeing the same thing when the Gutenberg plugin is deactivated. It seems like you are using an older version of WordPress based on the alignment drop down options I see. |
@paaljoachim I'm definitely using WP 5.7.1, and it's been 5.7.1 since 5.7.1 was released. This is a brand new page that I've just created and inserted some Cover Image Blocks on This is the same page from above Both Block Toolbars are the same. Both pages are on the same site. The Purple image doesn't align properly in the editor. The (new) Blue image does. The purple image is on a page that was originally created back in 2018. The blue image is on a page I just created now. This has always been an issue with Gutenberg. Old content doesn't work the same as new content, after blocks have been changed, which is a huge bug and incredibly frustrating. This has been bought up time and time again. I shouldn't have to go back and re-save every single page in my site, every time Gutenberg changes (which has been every single major release since 5.0), just to get it to work properly. Gutenberg v10.4.1 is activated. Edit... My screenshots above and in my previous post are while using the TT1 Blocks Theme |
Ahhh Gotcha! Any thoughts Dan? |
I think the root cause was fixed by #28796. The comment #28796 (comment) describes exactly what has happened.
What seems to have happened then is that @maddisondesigns's post was saved with the invalid alignment. Unfortunately that means the fix in #28796 has no effect. It may be possible to go back to a previous revision, and then alignments will work again, but I understand you may also have changed other parts of the post that you don't want to revert. An option would be to follow up with some further fixes, it would involve revisiting the deprecations modified in #28796 and writing a migration function that makes the alignment class name an attribute again. |
@talldan Looking back through the revisions for that Post, I can see that it's been almost 2 years since that attribute was changed from Every revision since then, those blocks have had that Regardless, some migration fix needs to be created because you can't expect people to remove and then re-add blocks in all their old content, just to fix something that no longer works because Gutenberg changed. |
Would you be able to share the markup from that revision (the one with |
@talldan Here's the markup for those two revisions in that above screenshot. 2 years ago (24 May @ 13:56)
After:
This is a local site so those image urls obviously wont resolve. |
I have noticed this too. I have a full width video block on one of my sites ( https://porfiados.food.blog ) that gets changed to "No Alignment" every time I edit the page the block is: This is the html for the block:
|
Cover: Video:
|
@mrfoxtalbot Do you mind opening a separate issue for the video block? |
I seem unable to reproduce this issue outside the specific example I shared. Please disregard my comment. Thank you @carolinan! |
Describe the bug
I have 3 Cover Blocks within a page. Each one had a different width set. One block was just shown as 'normal/default' width, one was set to Wide and the third was set to Full.
When I edit the page now under 5.3 RC3, all three blocks just show as normal width within the editor. When I view the page in the browser, they're shown at the correct widths.
When I view the code in the editor, you can see that they've been set to the three different widths (or more accurately, two have been set to different widths and one just left at its default width)
When I view the change alignment option on the toolbar, none of the blocks show the widths that were originally selected.
To reproduce
Steps to reproduce the behavior:
Expected behavior
Blocks should display the same from version to version. I shouldn't have to reset the properties of a block every time WordPress updates.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: