JavaScript for WordPress Forums Gutenberg Development Unable to edit a block after saving

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #61311
    Andrea Barghigiani
    Participant

    Hi all,
    I am sure that this will be a silly one but I have a problem when I try to edit my saved blocks, any time I try to edit after a full page reload I get this message:

    There’s something wrong between my edit() and save() methods because opening the Dev Inspector Tools I get the following: Gist

    There is a problem of validation because it looks like there is a <br/> before the <h3> closing tag and I do not understand where it cames from.

    Thank you for the future help!
    Andrea

    #61401
    Andrea Barghigiani
    Participant

    Alright guys, once again I found my silly mistake by myself.

    The error is pretty stupid and Zac told us about it in the save() lesson, but I didn’t listen properly 😀

    Basically I was saving a different HTML element for my block, in the edit() method I used an h2 for my title but later on I will save() an h3 and this was compromising the validation.

    Hope this can help,
    Andrea

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.