WordPress.org

Make WordPress Core

Opened 8 months ago

Last modified 3 weeks ago

#52790 reopened defect (bug)

Reusable blocks disappeared

Reported by: jordiparera Owned by:
Milestone: 5.8.2 Priority: normal
Severity: critical Version: 5.7
Component: Editor Keywords: reporter-feedback needs-testing 2nd-opinion
Focuses: Cc:

Description

Hi,

After the 5.7 updated, my reusable blocks stopped showing on all the posts. Also, when I try to edit them again, it is impossible. I have (had) two reusable blocks: one for all my social icons and another one with a shortcode. Both are missing now.

Is there a possibility to restore the reusable blocks from my last backup? Unfortunately, I did not export them to a JSON file.

Thanks.

Attachments (4)

Bildschirmfoto 2021-03-12 um 18.09.09.png (195.1 KB) - added by mansoor1 8 months ago.
Broken Reusable Block Listed
Bildschirmfoto 2021-03-12 um 18.10.22.png (153.8 KB) - added by mansoor1 8 months ago.
Broken Reusable Block Editorview is empty
double-image-block-2.json (78 bytes) - added by mansoor1 8 months ago.
JSON File of the broken Reuseble Block
RBs disappeared.png (130.2 KB) - added by jordiparera 7 weeks ago.

Download all attachments as: .zip

Change History (75)

#1 @desrosj
8 months ago

  • Component changed from General to Editor
  • Keywords reporter-feedback added

Hi @jordiparera,

Welcome to Trac! I'm sorry you are experiencing an issue with 5.7 on your site. Let's see if we can figure out what's going on.

When you say they are missing, can you explain where you have looked and where you expect them to be?

Also, can you elaborate a bit on what happens when you try to edit them? Also, can you head to site.com/wp-admin/edit.php?post_type=wp_block and see if your reusable blocks are listed there?

#2 @mansoor1
8 months ago

Hi,

My colleague have also the same Bug. But i cant reproduce it. Will give you also Feedback, if i found out HowTo Reproduce it.

#3 @mansoor1
8 months ago

I looked also under site.com/wp-admin/edit.php?post_type=wp_block and there is the reusable blocks and if i click on edit, then its empty. i also duplicate this reusable blocks, but the duplication is also empty like the json file.

@mansoor1
8 months ago

Broken Reusable Block Listed

@mansoor1
8 months ago

Broken Reusable Block Editorview is empty

#4 @mansoor1
8 months ago

The Problem is, that the Content of the Reusable Block get removed. And not the Reusable Block it self. See my attached screenshots

Broken Reusable Block Listed
Broken Reusable Block Listed

Broken Reusable Block Editorview is empty
Broken Reusable Block Editorview is empty

Last edited 8 months ago by mansoor1 (previous) (diff)

#5 @mansoor1
8 months ago

  • Severity changed from normal to critical

@mansoor1
8 months ago

JSON File of the broken Reuseble Block

#6 @desrosj
8 months ago

  • Keywords needs-testing needs-patch added; reporter-feedback removed
  • Milestone changed from Awaiting Review to 5.7.1

Thank you both for the additional information! I've moved this to the 5.7.1 milestone so it can be investigated further.

#7 @hellofromTonya
8 months ago

  • Keywords reporter-feedback added; needs-testing needs-patch removed

Hello @mansoor1 and @jordiparera ,

Thank you for the information and screenshots.

I'm not (yet) able to reproduce the problem when updating from 5.6.2 to 5.7 (tried in Chrome, Safari, and Firefox). Need a little more information to help to reproduce and further investigate:

Are you able to disable all of the plugins and switch to a default theme such as Twenty Twenty-One (not a child theme)? If yes, please go ahead and then recheck. Is the reusable block content is restored?

If yes:

  • It's likely a plugin or theme conflict. To identify which one, re-active one plugin at a time and recheck the reusable block. When it breaks again, note which one caused it.

If no:

  • What version of WordPress did you update from?
  • What browser are you using?

#8 @mansoor1
8 months ago

Hi @hellofromTonya,

Its a 3 weeks old fresh installed WordPress Version 5.6.2 with the freeversion of the Theme Astra Version 3.1.2 (https://wordpress.org/themes/astra/) and these Plugins are installed:

I did the Update with the Browser Google Chrome Version 89.0.4389.82 running on my Apple Macbook Pro 16 macOS BigSur Version 11.2.3.

I also revert the update via Serverautobackupsystem.
But all 3 times after Update to Version 5.7 i got the Issue with the broken Reusable Blocks.

Server

Server architecture	Linux 2.6.32-openvz-042stab145.3-amd64 x86_64
Web server	nginx/1.19.6
PHP version	7.4.15 (Supports 64bit values)
PHP SAPI	fpm-fcgi
PHP max input variables	10000
PHP time limit	1200
PHP memory limit	-1
Max input time	1200
Upload max filesize	512M
PHP post max size	512M
cURL version	7.52.1 OpenSSL/1.0.2u
Is SUHOSIN installed?	No
Is the Imagick library available?	Yes
Are pretty permalinks supported?	Yes
.htaccess rules	Your .htaccess file contains only core WordPress features.

Filesystem Permissions

The main WordPress directory	Writable
The wp-content directory	Writable
The uploads directory	Writable
The plugins directory	Writable
The themes directory	Writable

Media Handling

Active editor	WP_Image_Editor_Imagick
ImageMagick version number	1800
ImageMagick version string	ImageMagick 7.0.8-66 Q16 x86_64 2019-09-23 https://imagemagick.org
File uploads	Enabled
Max size of post data allowed	512M
Max size of an uploaded file	512M
Max effective file size	512 MB
Max number of files allowed	20
Imagick Resource Limits	
area: 128 GB
disk: 9.2233720368548E+18
file: 768
map: 128 GB
memory: 64 GB
thread: 1
GD version	bundled (2.1.0 compatible)
Ghostscript version	9.26

NGINX vHost Config

server {
        listen 52.140.164.76:80;

        listen 52.140.164.76:443 ssl http2;
		ssl_protocols TLSv1.2;
        ssl_certificate /var/www/clients/client32/web248/ssl/mydomain.com.crt;
        ssl_certificate_key /var/www/clients/client32/web248/ssl/mydomain.com.key;

        server_name mydomain.com *.mydomain.com;

        root   /var/www/mydomain.com/web/current;

        location ~ /\.well-known/acme-challenge/ {
	   root /usr/local/ispconfig/interface/acme/;
	   index index.html index.htm;
	   try_files $uri =404;
        }
if ($uri ~ /\.well-known/acme-challenge/) {
	   break;
}

        if ($scheme != "https") {
            rewrite ^ https://$http_host$request_uri? permanent;
        }


        index index.html index.htm index.php index.cgi index.pl index.xhtml;





        error_page 400 /error/400.html;
        error_page 401 /error/401.html;
        error_page 403 /error/403.html;
        error_page 404 /error/404.html;
        error_page 405 /error/405.html;
        error_page 500 /error/500.html;
        error_page 502 /error/502.html;
        error_page 503 /error/503.html;
        recursive_error_pages on;
        location = /error/400.html {

            internal;
        }
        location = /error/401.html {

            internal;
        }
        location = /error/403.html {

            internal;
        }
        location = /error/404.html {

            internal;
        }
        location = /error/405.html {

            internal;
        }
        location = /error/500.html {

            internal;
        }
        location = /error/502.html {

            internal;
        }
        location = /error/503.html {

            internal;
        }




        error_log /var/log/ispconfig/httpd/mydomain.com/error.log;
        access_log /var/log/ispconfig/httpd/mydomain.com/access.log combined;

        location ~ /\.(?!well-known/) {
            deny all;
            access_log off;
            log_not_found off;
        }

        location = /favicon.ico {
            log_not_found off;
            access_log off;
        }

        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }



        location ~ \.php$ {
            try_files /55bf8b1d1b1eff10621d62434c66f75d.htm @php;
        }

        location @php {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            fastcgi_pass unix:/var/lib/php5-fpm/web248.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_intercept_errors on;
        }






        brotli_comp_level 9;

        location / {
            client_max_body_size 100M;

            add_header Referrer-Policy origin always;
            add_header X-Content-Type-Options "nosniff" always;
            add_header X-XSS-Protection "1; mode=block" always;


            rewrite /wp-admin$ $scheme://$host$uri/ permanent;

            location ~*  \.(jpg|jpeg|png) {
                if ($http_accept !~* "webp") {
                    break;
               }
               try_files /imageconverter.php?path=$request_uri /imageconverter.php?path=$request_uri&optimize=true;
            }

            location ~*  \.(jpg|jpeg|png|gif|css|js|svg|ico|webp|eot|otf|woff|woff2|ttf)$ {
                expires 30d;
                log_not_found off;
            }

            location ~ js/container_.*_preview\.js$ {
                expires off;
                add_header Cache-Control 'private, no-cache, no-store';
            }

            error_page 418 = @cachemiss;
            if ($request_method = POST) {
                return 418;
            }
            if ($query_string != "") {
                return 418;
            }
            if ($http_cookie ~* "wordpress_logged_in_") {
                return 418;
            }
            if ($http_cookie ~* "comment_author_") {
                return 418;
            }
            if ($http_cookie ~* "wp_postpass_") {
                return 418;
            }

            try_files  /wp-content/cache/wp-rocket/$http_host/${request_uri}index-https.html =418;

            add_header "FP-Cache" "HIT";
            expires 7d;
            add_header "Cache-Control" "max-age=10, must-revalidate";

            location ~ \.php$ {
                try_files  /wp-content/cache/wp-rocket/$http_host/${request_uri}index-https.php  /wp-content/cache/wp-rocket/$http_host/${request_uri}/index-https.php $uri $uri/;

                include /etc/nginx/fastcgi_params;

                fastcgi_pass unix:/var/lib/php5-fpm/web248.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors off;

                fastcgi_temp_file_write_size 10m;
                fastcgi_busy_buffers_size    512k;
                fastcgi_buffer_size          512k;
                fastcgi_buffers           16 512k;
                fastcgi_read_timeout 1200;

                add_header "FP-Cache" "MISS";
                add_header "Cache-Control" "no-store, no-cache, must-revalidate, max-age=0";
                add_header "Pragma" "no-cache";

                    }
        }

        location @cachemiss {
            try_files $uri $uri/ /index.php$is_args$args;
        }





}

UPDATE: I think i found it. The Issue comes because of the outdated Plugin https://wordpress.org/plugins/duplicate-page/ which i replaced with the better plugin which is already up to date https://wordpress.org/plugins/wp-duplicate-page/ . And now i can't reproduce above Issue. If i will get the same issue in different WordPress Installation, then i will let you know. Thanks a lot for Feedbacks!

Last edited 8 months ago by mansoor1 (previous) (diff)

#9 @mansoor1
8 months ago

  • Resolution set to worksforme
  • Status changed from new to closed

#10 @hellofromTonya
8 months ago

  • Milestone 5.7.1 deleted

#11 follow-up: @mansoor1
8 months ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Issue is still there. Today my colleagues tested it on different WordPress Sites and it comes again :-(. So the above Solution didnt work.

#12 @davelo
8 months ago

I got the same kind of issue, even more critical.
Everywhere the block was used, the front of the page went black, a critical error.

In the admin, on that block i got the error: Block cannot be rendered inside itself.

On the admin page of all the reusable blocks, i noticed that specific block was empty, as described in this ticket.

#13 @mansoor1
8 months ago

  • Severity changed from critical to blocker

#14 in reply to: ↑ 11 @hellofromTonya
8 months ago

Replying to mansoor1:

Issue is still there. Today my colleagues tested it on different WordPress Sites and it comes again :-(. So the above Solution didnt work.

@mansoor1 for your colleague, were any plugins activated? If yes, what happens when all of the plugins are deactivated?

Why? Trying to isolate if the problem is coming from WordPress Core or one or more plugin(s).

This ticket was mentioned in Slack in #core-editor by hellofromtonya. View the logs.


7 months ago

#16 @hellofromTonya
7 months ago

  • Milestone set to 5.7.1

Moving it back into the milestone for further investigation, pending reporter feedback.

#17 @davelo
7 months ago

Hi, don't know how to communicate in trac.
But i though it would be okay to record a screencast, as i'm really worried about the new workflow of Resuable blocks in 5.7. We need to address that, now it's just creates doubts and bloated blocks for the user.

Screencast: https://share.woofers.be/mXu1eo8o

#18 @hellofromTonya
7 months ago

@davelo thank you for your report and sharing the screencast. The UI and workflow pain points you identify are different than the issue reported in this ticket. To ensure these are not lost in this ticket, can you open a new Trac ticket by going here? Instructions on how to report are https://make.wordpress.org/core/handbook/testing/reporting-bugs/#reporting-a-bug.

#19 follow-up: @davelo
7 months ago

Hi, is there any news of feedback around this ticket?
We have immensive problems with disappearing reusable blocks.
The workflow around reusable blocks since 5.7 is really become very unpleasant.

Now, i noticed the following:

  • i remove a reusable block from a page
  • i come back to the page, do some edits; saves it and the page "asks' if i want to save the resuable block; yes; that same resuable block which was removed before.
  • looking in the code editor; i see some leftovers like this: <!-- wp:block {"ref":20341} /--> i found that code at the bottom of the page; which was not in the place where the reusable block was placed originally.

And i think this is the big issue.
Because of the "leftover"-reusable code-tags; the reusable blocks are getting overwritten with ... nothing. In other word: the reusable block is gone; and there are no revisions; and a backup doesn't solve the issues, i just creates a loop for the issue to come back.

A critical issue, i believe.

#20 in reply to: ↑ 19 @hellofromTonya
7 months ago

Replying to davelo:

Hi, is there any news of feedback around this ticket?

Current status:

  • Unable to reproduce the problem
  • Awaiting feedback if the problem persists after disabling all plugins and using a default theme

Replying to davelo:

We have immensive problems with disappearing reusable blocks.

Can you share more context and the steps to reproduce "disappearing reusable blocks"? Are you having the same issue reported in this ticket of reusable blocks no longer showing on the posts and not editable after upgrading to 5.7?

Reading your 2 comments, I think (please correct me if I'm wrong) you're having (a) a different issue and (b) want to report a workflow problem. Is this correct?

  • If yes, please open a new ticket for each to ensure each gets its own consideration and investigation. Else, these can get lost in this ticket as it's focused on a different issue.
  • Also, try disabling all plugins and using a default theme such as Twenty Twenty-One. Do the problems persist? Why? By disabling the plugins and using a default theme, it can help to isolate if the problem is coming from WordPress Core or elsewhere. Please note, there are reports of plugin conflicts causing issues with reusable blocks.

#21 @hellofromTonya
7 months ago

Possibly related Gutenberg issue (was due to a plugin conflict) - linking to group all reports of Reusable Blocks issues

#22 @hellofromTonya
7 months ago

Possibly related Gutenberg issue - linking to group reports of Reusable Blocks issues

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


7 months ago

#24 @audrasjb
7 months ago

Hello, I tried to reproduce the issue on my side, but it works well. On a fresh install, and also on some other existing WP installations.

#25 @jordiparera
7 months ago

The problem persists even after deactivating all the plugins.

This is a critical and urgent issue.

I suggest leaving the reusable blocks just the way they were before the latest involved updates.

Thanks.

#26 @audrasjb
7 months ago

Hello @jordiparera, can you please provide detailed steps to reproduce the issue on a WordPress fresh install?

#27 @jordiparera
7 months ago

Hello,
As commented to old reusable blocks disappeared from all the pages where they've been so far.

The fact is that the new created reusable blocks do work (so far), so for a new install, if you create new R.Bs I guess they will be fine.

But the OLD ones are not shown in the post they were attached, and when you edit the old posts the R.B. appear just empty and when you try to edit it, it responds "Block cannot be rendered inside itself."

Sorry, I don't know how can I add an image to this form.

This ticket was mentioned in Slack in #design by joyously. View the logs.


7 months ago

This ticket was mentioned in Slack in #design by jameskoster. View the logs.


7 months ago

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


7 months ago

#31 @audrasjb
7 months ago

Moving to Milestone 5.7.2 as WordPress 5.7.1 Release Candidate 1 is planned for today.

#32 @audrasjb
7 months ago

  • Milestone changed from 5.7.1 to 5.7.2

#33 @edragonxx
6 months ago

Same here, updated wordpress and voila reusable blocks are useless now!!!

How to reproduce that bug? Simple, make a reusable block, now add it to your posts. Next time add it to new post, press "covert regular block" because sometimes you just want use it as template, like have block styles and stuff put in place but you want change text there, so you will use reusable blocks convert them to regular block and author was able to add their own text without changing text every other post too, worked perfectly. Not anymore, once you press convert regular block it will empty reusable block. Every fucking single time!

#34 @audrasjb
6 months ago

@edragonxx I tried to follow the steps you described in your comment and I'm not able to reproduce the issue on a fresh install.

Here is a video of the steps I followed: https://i.gyazo.com/7ea9ae3696ad89550a051fcb563865aa.mp4

Could you please provide more details about the issue? Does it occurs with both existing and new reusable blocks? Are you creating the reusable blocks on the same page you're converting them to regular ones? Any detail may help to reproduce the issue.

ps: please watch your language, the last sentence of your comment is not appropriate. Thank you :)

#35 @jagenda
6 months ago

Not sure if this is related but I've noticed a couple of changes that allow users to accidentally break their Reusable Blocks.

The block validation now strips content from Reusable Blocks that have other Reusable Blocks inside them. This is fine, but I find it odd that you're still allowed to add those nested blocks instead of preventing users from doing so in the first place.

Not only that but previously Reusable Blocks were not editable in the page editor, which meant that you were relatively safe from mistakes. What happens now though, is that the Add New Block (+) button inside Reusable Blocks is indistinguishable from the page content's Add New Block buttons and users keep adding nested Reusable Blocks by accident. The previous heading for Reusable Blocks is also missing, which would make it clearer, along with a clear outline, where a Reusable Block begins and where it ends.

My suggestion would be to disable the ability to add nested Reusable Blocks altogether, and to prevent Reusable Block edits inside pages. If not the latter then at least clarify which content belongs inside the Reusable Block and which is current page content. Adding a clear heading and border that does not require selecting the block and in fact makes it easier to click on.

Again, these may be separate issues but the outcome is definitely the same and has caused grief among clients who do not know how to check if a block is Reusable before adding more Reusable blocks into it. I understand there is a new Post Update system to select which content you want to save but it's been poorly documented (no mention of it anywhere in the patch notes) and this does not help less tech savvy end-users from adding content in the wrong place and having to fix it later, wasting valuable time.

#36 @travisburch
6 months ago

I'm having similar issues.

Reusable blocks have become unusable. Lose all integrity when edited/added/modified from a post.

Deleting themselves, lots of stuff. I've also had links delete themselves, and trouble Saving/Updating posts.

All of these issues are occurring even on fresh installs w/o any plugins.

Hosting techs (WPEngine) can't seem to replicate it -- though I'm seeing it on multiple (clean) browsers, and on multiple computers, on fresh WP installs.

Fwiw, I've never used the Autoptimize plugin.

Last edited 6 months ago by travisburch (previous) (diff)

#37 follow-up: @mrschaal
6 months ago

I've also been experiencing the same issues on WordPress 5.7.1 using the Virtue Premium Theme.

Additionally, adding new reusable blocks via clicking on "Add to reusable blocks" at the context menu of a block within the Gutenberg Editor while editing a page has not been working anymore either. It seemed that the click has been registered, but the block won't change at all and also has not been added to the list of reusable blocks.

By deactivating all plugins and re-activating them one by one again, I've found out that the plugin "Autooptimize" causes this issue. As soon as I have deactived it, the issues were gone!

Now I can at least create new blocks, but can't reference them within any other page than the page on which they have been created. The widget for adding reusable blocks won't find the newly created one. Therefore I have no chance to find and embed the reusable block while editing another page anymore.

This ticket was mentioned in Slack in #core-editor by vdwijngaert. View the logs.


6 months ago

#39 in reply to: ↑ 37 @OptimizingMatters
6 months ago

That's somewhat surprising, as Autoptimize does not optimize admin-pages @mrschaal ... That being said, have you tried reconfiguring AO (e.g. disabling JS optimization or other settings) to see what might be happening here?

Replying to mrschaal:

I've also been experiencing the same issues on WordPress 5.7.1 using the Virtue Premium Theme.

Additionally, adding new reusable blocks via clicking on "Add to reusable blocks" at the context menu of a block within the Gutenberg Editor while editing a page has not been working anymore either. It seemed that the click has been registered, but the block won't change at all and also has not been added to the list of reusable blocks.

By deactivating all plugins and re-activating them one by one again, I've found out that the plugin "Autooptimize" causes this issue. As soon as I have deactived it, the issues were gone!

Now I can at least create new blocks, but can't reference them within any other page than the page on which they have been created. The widget for adding reusable blocks won't find the newly created one. Therefore I have no chance to find and embed the reusable block while editing another page anymore.

#40 @emilymoran84
6 months ago

  • Severity changed from blocker to critical

I hope this is the appropriate place to add this. (I'm not entirely versed in how core trac works, so please let me know if I should be starting a new ticket or placing this elsewhere). I just wanted to add that I've also found my reusable blocks are no longer in the "directory" if trying to add a new block. (I used to be able to search by the reusable block names). And I'm unable to make new ones. Here is a breakdown of what I'm seeing:

On the Reusable Blocks "List" page (/wp-admin/edit.php?post_type=wp_block)

  • My reusable blocks are still showing in the "list" page (/wp-admin/edit.php?post_type=wp_block), and I am able to go into their edit screen and see their content.
  • While I can access the "Edit" screen of a reusable block if going to the List of them, the "Update" button results in no action, thus making it impossible to actually edit existing blocks.
  • While I can click the "Add New" button on the list page (new block edit screen opens to /wp-admin/post-new.php?post_type=wp_block), when clicking "publish", it does the publish confirmation ask, then I click "Publish" again and it goes back to the first "Publish" button, never actually allowing me to publish the block

Within a post or page

  • Reusable blocks do not come up in the block search and there is no "Reusable" tab in the block sidebar (Should be "Blocks" "Patterns" "Reusable") Screenshot: http://snpy.in/RMQBcp
  • Existing reusable blocks already within content still seem to be displaying the reusable block's content and have something of a "ghost frame" of what should be the frame for editing them within the post they're embedded within, however the option is not present. Screenshot: http://snpy.in/H1JtpQ
  • If I switch to code editor view, I can see the HTML for the block, and it seems (at least from one test), that I can add an existing reusable block to a post if I flip to the Code Editor view and paste in the HTML (though cannot make new reusables). Example of the HTML:
<!-- wp:block {"ref":20311} /-->
  • I am unable to save new reusable blocks from within a post or page. Clicking the "Add to Reusable blocks" results in nothing happening.

Note: While I do have the Autoptimize plugin, it is not active (I saw that for another poster, disabling that plugin fixed some issues).

. Thank you!

Last edited 6 months ago by emilymoran84 (previous) (diff)

#41 @dd32
6 months ago

  • Milestone changed from 5.7.2 to 5.7.3

WordPress 5.7.2 has been released, moving open tickets to 5.7.3

#42 @davelo
5 months ago

Hi, is there any news around this. We just got -again- some crashed pages because Resuable Blocks ended up in another Reusable Blocks. Don't know how; it was an action of the site owner. But this sort of action must be prohibited by default; it just crashed pages and it's hard to monitor.

#43 @travisburch
4 months ago

I'm still getting this bug -- and it's happening in the 5.7.3 beta, too.

I made a video for my tech guy, and I'm happy to post it here (or delete it, if inappropriate):

https://www.youtube.com/watch?v=4B1M2oxk48M

My site depends heavily on ReUsable blocks, and my business has ground to a halt for several months now. I'm also having trouble saving pages after editing them (as you can see in the video). Data also appears unsafe, and will modify itself frequently. No tech support can find any malware or bad code, anywhere. Not sure what's going on, again, it's a huge deal for me.

#44 follow-up: @davelo
4 months ago

@travisburch first thing: use the keyboard arrows to easily switch between blocks; and go to the needed reusable block.
Second tip: check if you have reusable blocks inside reusable blocks. Cause that can get really messy. You can see that in the Block List View.

The way how you handle reusable blocks; like every image inside a reusable block. I wouldn't advise to do this cause... well, it's just unreliable at the moment. Plus, the UX for seeing reusable blocks is super hard, things can get quickly turn into a mess.
I would advise to set those logo's inside a group, and make that a reusable block.

As i said in this ticket: reusable blocks is the best but most underrated & ubderworked feature in Gutenberg.

If the core team is listening, i would suggest the next stuff:

  1. - always put an extra border around the reusable block (a on/off button would be okay for that border). If not wanted: read suggestion 3.

2 - don't allow creating reusable blocks inside reusable blocks; that could crash pages. This must be priority.

3 - build an indication in the gutenberg-header when the page has reusable blocks. Like a couloured bullet and then a number in it; hovering it gives a list view of reusable blocks. Click on it and you scroll to the selected reusable block. Because of this indication, users are less surprised when saving the page and suddenly see a notification of "saving a reusable block".

#45 @voneff
4 months ago

Hi there,

I just wanted to report that I am experiencing the same issue: some reusable blocks are suddenly empty, with no apparent way of retrieving the lost content.

In the meantime, others are working just fine. I am not quite sure, but I think the disappearing issue only happened to core "Group" and/or "Column" blocks. (Nested) reusable blocks added by third-party plugins (in my case "Ultimate Addons for Gutenberg") were not affected.

This seems quite serious as content really seems to be lost. It would great to get some more info on this!

Cheers!

#46 in reply to: ↑ 44 @travisburch
4 months ago

Replying to davelo:
First off, thanks :).

INSIDE -- I don't have any ReUsable blocks inside reusable blocks that I'm aware of. The error we saw was not the result of ReUsable Blocks inside ReUsable Blocks -- it's just a random error, apparently. I've got perhaps 150 ReUsable blocks -- should I go through each and make sure none of them have any?

GROUPS -- With my ~150 RU Blocks, should I go through and put them all inside a Group?

IMAGES -- These are only the main icons of the site, and they're used everywhere, hundreds of times, taking a viewer to that topic's home page. Not sure how else I can do that efficiently w/o ReUsable Blocks.

@travisburch first thing: use the keyboard arrows to easily switch between blocks; and go to the needed reusable block.
Second tip: check if you have reusable blocks inside reusable blocks. Cause that can get really messy. You can see that in the Block List View.

The way how you handle reusable blocks; like every image inside a reusable block. I wouldn't advise to do this cause... well, it's just unreliable at the moment. Plus, the UX for seeing reusable blocks is super hard, things can get quickly turn into a mess.
I would advise to set those logo's inside a group, and make that a reusable block.

As i said in this ticket: reusable blocks is the best but most underrated & ubderworked feature in Gutenberg.

If the core team is listening, i would suggest the next stuff:

  1. - always put an extra border around the reusable block (a on/off button would be okay for that border). If not wanted: read suggestion 3.

2 - don't allow creating reusable blocks inside reusable blocks; that could crash pages. This must be priority.

3 - build an indication in the gutenberg-header when the page has reusable blocks. Like a couloured bullet and then a number in it; hovering it gives a list view of reusable blocks. Click on it and you scroll to the selected reusable block. Because of this indication, users are less surprised when saving the page and suddenly see a notification of "saving a reusable block".

Last edited 4 months ago by travisburch (previous) (diff)

#47 @desrosj
4 months ago

With 5.8 RC1 due out next week and no 5.7.3 currently planned, I'm going to punt this to the milestone for the next minor release: 5.8.1.

#48 @desrosj
4 months ago

  • Milestone changed from 5.7.3 to 5.8.1

#49 @travisburch
4 months ago

UPDATE: My tech guy found this error:

Block validation: Block validation failed for core/paragraph

I'd be happy to post this on another ticket, if needed. I know there are several tickets concerning this issue.

#50 @brit1226
3 months ago

Can we get an update on the status of this issue? It appears many people are experiencing the same erratic issues (myself included). I haven't pinpointed a rhyme or reason to the block's content disappearing in the post/page they're embedded in except one possible correlation. So perhaps that's why developers aren't able to duplicate the issue.

To provide more detail...

Reusable blocks are still present in the resusable blocks list and you are still able to add them to the post/page. But when you do, they look like just empty blocks with a plus sign in the middle (no content). Here's a potential trend I found - At the moment, the reusable blocks that are within a group are the ones malfunctioning although I'm not certain if that's to blame or not. When you look at the same reusable blocks in the menu to edit them, the content is gone. When I re-create the content, after a while the content disappears again.

I really hope we can get more information on this. Please let me know if I can provide any detail to help this issue be solved. I'd do just about anything to have my pages functioning and displaying properly again.I have hundreds of pages that include reusable blocks that are no longer displaying content. I really hope I don't have to manually update each page to get the content back.

Last edited 3 months ago by brit1226 (previous) (diff)

#51 @Larrian
3 months ago

I have the exact same issue. After the WordPress update all my reusable blocks have disappeared in content. It shows in the list..but if I go to edit the block..the content is gone. I get the same nesting error. It seems every update of Wordpress comes with Gutenberg block issues. Waiting for a patch???

#52 in reply to: ↑ description @mwcs
3 months ago

Replying to jordiparera:

Hi,

After the 5.7 updated, my reusable blocks stopped showing on all the posts. Also, when I try to edit them again, it is impossible. I have (had) two reusable blocks: one for all my social icons and another one with a shortcode. Both are missing now.

Is there a possibility to restore the reusable blocks from my last backup? Unfortunately, I did not export them to a JSON file.

Thanks.

#53 @mwcs
3 months ago

I'm a Trac novice, so please correct me if I should open a new ticket - because I'm using WP 5.8

My Reusable Blocks are also disappearing as described in this thread. i.e. the block title remains, but the content is empty.

When I go to 'Manage Reusable Blocks' I can use Revision History > to restore the content from autosave, but then a warning notice is displayed in the yellow box:

"The backup of this post in your browser is different from the version below.
[ restore the backup ]"

If I click the "Restore the Backup" button in the warning notice, the content disappears again.

The blocks appear to break when the content is edited within the post or page. Not all blocks break when doing this, but I have seen the following block types break numerous times: Social Icons (WP core) and Jetpack Appointment Form. These are fairly "vanilla blocks" with only slight modifications, i.e. the phone number field is removed.

If I edit the block within a page or post and then save that post... at some point after that, the reusable block content is blank.


OPTIMISATION

I'm not sure if this is related, but I am using Jetpack and also the Litespeed Cache plugin.

However, all caching and optimisation in Jetpack and Litespeed LSCache is currently disabled.

The only optimisation that is enabled in Litespeed is:

Editor Heartbeat TTL = 30s
Back-end Heartbeat TTL = 60s
CSS Minify,
Lazy Load,
Load Google Fonts Asynchronously

#54 @jordiparera
3 months ago

The situation with reusable block bad behavior is worse than I thought. Now I go to my website - Appearance - Widgets, and guess what appears there? Just a reusable block, and nothing else, nothing at all. Unbelievable.

#55 @bmatthewwhite
2 months ago

Same issue. I have run into this for the block type "button", however on the same site the type "paragraph" is not impacted.

The blocks in question do not appear on the front-end. They load the name of the block with no content in the admin.

Content for the original block is missing.
https://reddihvac.com/wp-content/themes/reddi/img/wp-block-missing.png

#56 @paaljoachim
2 months ago

Hello everyone!

I am sorry to hear about the errors many are experiencing! The difficult part here is finding a way to replicate this error. @travisburch tech guy figured out one error and Travis opened a new Trac ticket here: https://core.trac.wordpress.org/ticket/53136

What we need here is having as detailed step by step approach as possible. Using one of the default themes Twenty Twenty One. Turning off all plugins. Because as has been mentioned earlier we need to remove the uncertainty that a plugin or theme is having a compatibly problem with the usage of Reusable blocks. This might mean that one needs to create a development site. A copy of the live site. I would suggest you use Duplicator. I am linking to my video on how to use Duplicator: https://www.youtube.com/watch?v=3YDQ3Ey_2wY to create a backup and to clone your site to another location. In the development site (cloned site) use only Twenty Twenty One, WordPress 5.8 and no plugins activated, and see if the errors remain. If the errors are gone this also likely means that there has been a theme or plugin conflict causing the errors.

I would also suggest cleaning up the database to see if that helps.
Using a plugin such as https://wordpress.org/plugins/advanced-database-cleaner/ as it can repair and clean the database. (Do a backup of the site first.)


I would like to address the video shared by @davelo in comment: https://core.trac.wordpress.org/ticket/52790#comment:17

Some issues regarding Reusable blocks that were brought up.

Regarding WP 5.7 Not clear where to add title. This changed in WP 5.8 having a modal show up when saving a Reusable block. To rename the block one still has to go to the sidebar settings.
The problem of clicking directly into the blocks inside the Reusable block and making accidental changes. Some issues with saving changes/discarding a save to a Reusable block.
I too noticed the drastic change that happened to Reusable blocks going from WP 5.6 to WP 5.7. Changes that made Reusable blocks harder to use and easier to make accidental changes.

I hope that we will see some improvements for Reusable blocks make their way into WP 5.8.1 which is to be released on September 1st.

If you would like to explore what is going on in relation to adjustments to Reusable blocks then test out the Gutenberg plugin and check out the Github repository for Gutenberg, and click the labels button and click Reusable blocks label. Here is the direct link: https://github.com/WordPress/gutenberg/labels/%5BFeature%5D%20Reusable%20Blocks

I am hoping my comment might help just a little bit on your way to figuring out solutions for a more enjoyable experience with Reusable blocks.

#57 @gabscoll
8 weeks ago

I was having this problem and just fixed it. I'm perplexed as to how or why it happened but anyway.. here's what I did.

I opened up the outline / list view of blocks. I deleted the blocks in the list named "Reusable block". Then I reinserted the named resuable block (eg "Large green button"). There should be nothing in the list with the default name "Reusable block".

#58 @desrosj
8 weeks ago

  • Keywords needs-testing added
  • Milestone changed from 5.8.1 to 5.8.2

WordPress 5.8.2 RC is due out in less than 24 hours. It's still not clear how to reproduce the issues described here reliably enough so that the root cause can be determined.

If anyone that had experienced the issue is able to test on WordPress 5.8, that would be helpful to confirm that this bug was not fixed through the many enhancements and refinements included in that release.

#59 @amazingribs
7 weeks ago

We are having the same problems with Reusable Blocks (RBs). The problem started happening after a WP update which changed the default behavior of RBs. Before the update, RBs were locked and uneditable. You had to proactively choose to edit the RB and then "save the changes" or "update the Block".

After the update RBs were immediately editable within any post or page and then if you made a change, WP would prompt you to save the changes to the RB.

This was an ill-advised update to the behavior. The point of a RB is to store content that DOES NOT CHANGE! You want the block to stay the same across the entire site! That's the point. Who thought it was a good idea to make RBs easier to edit and change?

We have RBs where the content has been deleted. The revisions history does not even show what was deleted or when. We have also seen multiple RBs being combined. Suddenly, one RB contains the content for several other RBs.

We also see that after inserting the RB it is no longer a reusable block. If you right click on it the context menu considers the reusable block just a normal block.

#60 @jordiparera
7 weeks ago

Hello,
Well, everything is now very clear to me. I have a copy of my web date June 6th in my hosting (hidden, just for trials). That copy was prior to WP 5.8. I deactivated some plugins that could affect the RB (especially the Rank Math SEO and others). Everything OK.

Then, today, I've updated it to 5.8 and the RB crashed, also the "Appearance/Widgets" option (pls, see attached).

#61 @salutik411
7 weeks ago

  • Keywords 2nd-opinion added
  • Type changed from defect (bug) to enhancement

Hello,

Problem 1:

I have disabled "Yoast SEO" and the blocks are displayed correctly.

Those who have encountered this problem, deactivate all plugins one by one, until you find the culprit plugin.

UPDATE:

Problem 2:

The problem is related to the timeout somehow. We receive an API response from the /wp-json/wp/v2/blocks/4528?context=edit&_locale=user
but the content in '.block-editor-block-list{underscore}{underscore}layout' remains unchanged.

When I do CTRL + SHIFT + R no HTML is added to '.block-editor-block-list{underscore}{underscore}layout' for any reusable block. When I load the page with CTRL + R, then some blocks appear, some do not.

Classes:


block-editor-inner-blocks -> .block-library-block__reusable-block-container -> 
.block-editor-block-list__layout

Have a good day

Last edited 7 weeks ago by salutik411 (previous) (diff)

#62 @paaljoachim
7 weeks ago

I will assume that this Github Gutenberg issue is associated:
WordPress 5.7 cannot create new reusable block or change an exisiting one
https://github.com/WordPress/gutenberg/issues/29885

#63 @jordiparera
5 weeks ago

Hi,
Deactivated all the plugins and the problem continues. In my opinion, the problem comes from the fact that the reusable blocks' behavior was somehow changed on a system update to make reusable blocks EDITABLE within the posts or pages. This is nonsense. The reusable blocks should never be editable inside any post nor page, as it occurs with the rest of normal blocks. Moreover, when trying to change a reusable block inside a post, the message that is comes is usually "Block cannot be rendered inside itself." After that, the block you are trying to modify gets completely destroyed.

#64 follow-ups: @audrasjb
5 weeks ago

Hello,

In my opinion, the problem comes from the fact that the reusable blocks' behavior was somehow changed on a system update to make reusable blocks EDITABLE within the posts or pages

I just wanted to mention that since the beginning of the block editor in WordPress, reusable blocks have always been editable from the post they were inserted.

This is unrelated with the issue :)

#65 in reply to: ↑ 64 ; follow-up: @jagenda
5 weeks ago

Replying to audrasjb:

Hello,

In my opinion, the problem comes from the fact that the reusable blocks' behavior was somehow changed on a system update to make reusable blocks EDITABLE within the posts or pages

I just wanted to mention that since the beginning of the block editor in WordPress, reusable blocks have always been editable from the post they were inserted.

This is unrelated with the issue :)

I strongly disagree. Editing reusable blocks within page editor may not be the exact the issue described here (that of disappearing reusable blocks) but it is definitely related to the reason these problems occur in the first place.

Before 5.7 a reusable block was displayed as its own block and you could not click on any of the blocks it contained. If you wanted to edit the contents of said block within the page, you had to convert it to regular blocks, which would not affect the reusable block itself, only the contents of that page. In order to edit the reusable block itself there was a link to edit the block, which brought you to a separate wp_block edit page. At no point did you edit the contents of the reusable block within the page editor. At the very least doing so was so obscure that nobody could do it by accident as is the case now.

Firstly, it's nigh impossible to even select the reusable block itself. Even I struggle to click on the right spot, because the reusable block has no padding, no heading section and no borders. I cannot begin to describe the number of times I get support calls from less tech savvy end-users, who accidentally removed the content of a reusable block or moved the content from the reusable block to the page when they were simply trying to get rid of an instance of the reusable block from one page. Every time this happens, it affects the whole site, not just the page they are editing.

Secondly, the lack of visual clarity around the resuable block means that you cannot differentiate where it begins and ends. Prior to this change you did not have the Add Block button inside the reusable block itself. Now that you do, it is no wonder that users keep adding reusable blocks within other reusable blocks because you cannot tell when you are adding blocks to the page and when you are adding them to the reusable block contents. THIS is what causes the blocks to break due to nested reusable blocks.

So I would argue that the whole reason these problems arise is because users have no idea what they are editing at any given moment.

The simplest solution would be to give developers the ability to revert back to the old system by adding an option to lock reusable blocks within pages so that they cannot be edited anywhere other than the wp_block edit page.

#66 in reply to: ↑ 64 @mwcs
5 weeks ago

Replying to audrasjb:

IMO, ... the reusable blocks' behavior was changed on a system update to make reusable blocks EDITABLE within the posts or pages

... since the beginning of the block editor in WordPress, reusable blocks have always been editable from the post they were inserted.

This is unrelated with the issue :)

Why do you think it unrelated? As several people have mentioned, blocks started disappearing in WP 5.7. Before, RBs were locked and uneditable. You had to proactively choose to edit the RB and then "save the changes" or "update the Block".

https://core.trac.wordpress.org/ticket/52790#comment:59

nobody could do it by accident as is the case now.

https://core.trac.wordpress.org/ticket/52790?replyto=64#comment:65

Last edited 5 weeks ago by mwcs (previous) (diff)

#67 @bmatthewwhite
5 weeks ago

  • Type changed from enhancement to defect (bug)

Having many issues with RB's content disappearing. Just ran into this. This behavior is incorrect? Deleted one reusable block, a second instance of that block is also deleted. WP 5.8.1

https://imgur.com/a/xT291ko

Edit: Note, I actually deleted the button within the reusable block, not the block itself... Though the link said "remove block". As noted in other comments, this behavior seems different since the 5.8 update. I can't recall the exact behavior in 5.7, but it was not this easy to inadvertently edit content that would impact all instances of an RB.

Last edited 5 weeks ago by bmatthewwhite (previous) (diff)

#68 in reply to: ↑ 65 @amazingribs
5 weeks ago

Replying to jagenda:

Replying to audrasjb:

Hello,

In my opinion, the problem comes from the fact that the reusable blocks' behavior was somehow changed on a system update to make reusable blocks EDITABLE within the posts or pages

I just wanted to mention that since the beginning of the block editor in WordPress, reusable blocks have always been editable from the post they were inserted.

This is unrelated with the issue :)

I strongly disagree. Editing reusable blocks within page editor may not be the exact the issue described here (that of disappearing reusable blocks) but it is definitely related to the reason these problems occur in the first place.

Before 5.7 a reusable block was displayed as its own block and you could not click on any of the blocks it contained. If you wanted to edit the contents of said block within the page, you had to convert it to regular blocks, which would not affect the reusable block itself, only the contents of that page. In order to edit the reusable block itself there was a link to edit the block, which brought you to a separate wp_block edit page. At no point did you edit the contents of the reusable block within the page editor. At the very least doing so was so obscure that nobody could do it by accident as is the case now.

Firstly, it's nigh impossible to even select the reusable block itself. Even I struggle to click on the right spot, because the reusable block has no padding, no heading section and no borders. I cannot begin to describe the number of times I get support calls from less tech savvy end-users, who accidentally removed the content of a reusable block or moved the content from the reusable block to the page when they were simply trying to get rid of an instance of the reusable block from one page. Every time this happens, it affects the whole site, not just the page they are editing.

Secondly, the lack of visual clarity around the resuable block means that you cannot differentiate where it begins and ends. Prior to this change you did not have the Add Block button inside the reusable block itself. Now that you do, it is no wonder that users keep adding reusable blocks within other reusable blocks because you cannot tell when you are adding blocks to the page and when you are adding them to the reusable block contents. THIS is what causes the blocks to break due to nested reusable blocks.

So I would argue that the whole reason these problems arise is because users have no idea what they are editing at any given moment.

The simplest solution would be to give developers the ability to revert back to the old system by adding an option to lock reusable blocks within pages so that they cannot be edited anywhere other than the wp_block edit page.

I totally agree with you. This all started happening after the update to the editing behavior for reusable blocks. It makes no sense to allow editors to freely edit an item that was originally intended as "boilerplate" content. The whole point of reusable blocks was to allow editors to add repeatable text and content easily AND to maintain that content across multiple pages! This is tantamount to permitting editors to edit a page template within a post. It makes no logical sense.

#69 @paaljoachim
5 weeks ago

We are hoping to get a lock icon added to the Reusable block toolbar so we once again can protect the content.

Add lock feature for Reusable Blocks to protect inner blocks
https://github.com/WordPress/gutenberg/pull/32710

@matveb Matias
Also suggested renaming Reusable blocks to Synced blocks.
Proposal to rename "reusable blocks" to "synced blocks"
https://github.com/WordPress/gutenberg/issues/34352

What we need are developers willing to spend some time helping to add fixes and new features.
Thanks.

Last edited 5 weeks ago by paaljoachim (previous) (diff)

#70 @Pcosta88
4 weeks ago

Hi Team,

While I cannot speak for all the reusable block issues contained in this thread, I have been able to repeat it in at least one occurrence.

Technical Specs:

WordPress: 5.8.1
Web Server: Apache
Database: MySQL 8.0.16
Theme: 2021 v1.4
Plugins: None active

Steps to Reproduce

  1. Add content via a paragraph tag
  2. Save as a reusable block
  3. Save post
  4. Check the reusable block menu and see that it appears. Append: wp-admin/edit.php?post_type=wp_block to the end of the domain to access the menu.
  5. Click inside the reusable block. Attempt to drag it to another spot. It seems like I dragged out from its reusable block spot?
  6. Update post (if prompted to save the block upon update in the sidebar, make sure it's clicked)
  7. Refresh the reusable block in the menu and see that it's gone.

I took a video of it here: https://www.loom.com/share/2bd5416fd5bf4b3e84d731de4671338f.

Note, that I had a brief issue at the end saving it and it took me a moment to remove the offending cat from the keyboard. It's unrelated to the issue describe above.

I hope the team and others find it helpful.

Last edited 4 weeks ago by Pcosta88 (previous) (diff)

#71 @jagenda
3 weeks ago

Here's a simple CSS fix to improve Reusable Block clarity with a border and padding and prevent users from accidentally selecting inner blocks of a Reusable Block.

Only tested on Chrome so far but should give a rough idea of how to implement a temporary solution.

.block-editor-block-list__block.wp-block.is-reusable{
  padding:10px;
  border: solid black 1px;
  margin-bottom:25px !important;
}
.block-library-block__reusable-block-container{
  pointer-events:none;
}

.block-library-block__reusable-block-container .block-editor-block-list__layout{
  pointer-events:none;
}

.block-library-block__reusable-block-container .block-editor-block-list__layout::after{
  content: "";
  pointer-events:all;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 var(--wp-admin-border-width-focus) transparent;
}

.block-library-block__reusable-block-container .block-editor-block-list__layout .wp-block{
  pointer-events:none;
}
Note: See TracTickets for help on using tickets.