Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter steveforeman

    (@steveforeman)

    Thank you for the fast response. The patch cures the problem.

    Many thanks again.

    Steve

    Thread Starter steveforeman

    (@steveforeman)

    This appears to be the result of past automated activities (possibly during a plugin update of some type). The impacted group blocks all had a background colour, and the <!– wp:group …. –> tags of old block patterns had a different structure from those of newly-created ones.

    Using the code editor view to replace the tags with the (new) version that worked has resolved this issue.

    Thread Starter steveforeman

    (@steveforeman)

    I deactivated all plugins except Ultimate Member and CoBlocks and reverted to the twenty twenty three theme. The problem was still there.

    I could not reproduce it with new block pattern, but comparing these with the existing ones I found that the opening <!– wp:group …. –> tag for blocks with a background colour had different content. Copying the “new” version to the “old” block patterns has resolved the issue.

    The cause must lie with a past action (possibly an unrelated plugin update) that modified all group headings but hadn’t treated this case correctly.

    I am closing this as I have found a work-around and the cause is unlikely to be repeated.

    Thread Starter steveforeman

    (@steveforeman)

    @andrewshu

    Here is an example of the issue.

    This block was protected in the original post, but when I opened the post for re-editing, the block was no longer protected. I tried adding the protection, but it was removed again after I had republished it.

    The group block that I am trying to assign?permissions to is the one with the grey background. Here it is when I added the restriction again.

    Switching to code editor, the text behind this is (URLs masked):

    <!-- wp:group {"um_is_restrict":true,"um_who_access":"1","um_roles_access":["um_member"],"backgroundColor":"central-palette-23"} -->
    <div class="wp-block-group has-central-palette-23-background-color has-background"><!-- wp:paragraph -->
    <p><img class="wp-image-2759" style="width: 25px;" src="@@@@@@@@@@@" alt="Member only content"> As a member, you can claim your discount by .......</p>
    <!-- /wp:paragraph --></div>
    <!-- /wp:group --></div>
    <!-- /wp:group -->

    Updating the post and then refreshing the editor keeps the content retriction.

    However, if I close the post and re-open it, the restriction disappears:

    <!-- wp:group {"backgroundColor":"central-palette-23"} -->
    <div class="wp-block-group has-central-palette-23-background-color has-background"><!-- wp:paragraph -->
    <p><img class="wp-image-2759" style="width: 25px;" src="@@@@@@@" alt="Member only content"> As a member, you can claim your discount by .......</p>
    <!-- /wp:paragraph --></div>
    <!-- /wp:group --></div>
    <!-- /wp:group -->

    I have done some experimentation, and it appears only to happen when I try to edit posts “from the past”. I can create a new post, protect a group block, publish it, and then re-edit and the protection is retained.

    However, when I edit an existing post, the group block loses its content restriction. I thought that this might only be happening with the “Block pattern” posts (managed using CoBlocks), but when I edited an “old post” that I had consigned back to draft, I found that the protections had been removed.

    For obvious reasons I do not want to open an already published public post to text whether that loses its protections!

    I have had this problem off and on since Gutenberg editor was introduced (though I only use YouTube embeds in posts).

    My two latest posts with YouTube embeds showed the video in the editor, but not in the displayed post. Strangely, earlier posts were still working, even though I had cleared the caches on both the server and my browser.

    I eventually tracked it down. On the old posts, I was using the youtu.be/???? form of the video link, while on the new ones I was using the youtube.com/v/w=????

    Hope this gives others a clue on how they might solve the problem.

Viewing 5 replies - 1 through 5 (of 5 total)