• Resolved zakoops

    (@zakoops)


    Hello,

    Clicking the small “Clear” button in the “Background Options/Background Color” section, in the sidebar proper to the “AB Container”, makes this block unrecoverable after updating and quitting the post (or page).

    Upon return to the post (or page), I’m greeted with the message:

    This block has been modified externally.

    …with the options to “Convert to Blocks” or “Keep as HTML”, both of which will nevertheless destroy whatever contents was inside the “AB Container”… At least, that’s what I get on my system (macOS High Sierra, WP 4.9.8, Gutenberg 3.8, last versions of Safari and Chrome).

    Unless, of course, I’m not using correctly that kind of block, I would venture to say that the “AB Container” block should be a little less vulnerable.

    Thanks for looking into the matter!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author atomicblocks

    (@atomicblocks)

    Hi there,

    The issue with converting nested blocks is an issue with Gutenberg itself, not the block, and has been reported here. Keep an eye on that ticket to know when the fix goes out!

    I’m not seeing the same issue with clearing the color on my end. I’m able to clear without getting the error. I would need a little more info to try and recreate it. What does the console error say after the error occurs. That would give me a little more to work with.

    Thread Starter zakoops

    (@zakoops)

    Hi,

    Thanks for your reply!

    Your answer seems to suggest that the problem I refer to manifests as soon as I click on the “Clear” button. But no error is shown here as a result of that action and I’m afraid I was not sufficiently explicit…

    Detailed steps to reproduce the problem, just to be sure:

    1. I insert an AB Container block with nothing inside (apart from the empty default Paragraph block).
    2. I then click the Clear button as mentioned before (background-color was the default #fff and now that property is gone from the inline style attribute).
    3. I then update (publish) the post. No error has been shown yet.
    4. I go back to the dashboard (meaning, I quit the Gutenberg editor).
    5. Then I go back to the Gutenberg editor, to modify or review my post.
    6. And then, not before, I see the message “This block has been modified externally.”

    If I select a solid background color or an image for the AB Container block (instead of clearing the background) and that I repeat the six steps above, I never encounter such problem —hence my suspicion about that small Clear button. But that could well be an issue with Gutenberg itself as mentioned in your message…

    If needed, I can provide a screenshot of the Chrome console on your github repo as it seems we can’t post images here…

    I’m taking the opportunity to thank you for that fine set of additional blocks.

    Hi, just wanted to add that I’m seeing the exact same issue when clearing the background color for an AB container. Here’s the error message in the console that appears only after leaving Gutenberg editor and coming back (only relevant bits here: the background-color):

    Block validation: Block validation failed for 'atomic-blocks/ab-container'
    Expected:
    <div style="background-color:#fff;padding-left:0%;...
    
    Actual:
    <div style="padding-left:0%;...

    Clearing the background color causes the validation to fail the next time the editor is opened. Actual styles do not have background-color defined (as it is cleared) but validation seems to expect it anyway.

    Plugin Author atomicblocks

    (@atomicblocks)

    Thanks for the note! I can see the issue myself and will be issuing a fix soon!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Small bug in AB Container?’ is closed to new replies.