Button "Ignore" Unexpected or Invalid Content

  • Unknown's avatar

    Sometimes we edit a block via HTML and add valid HTML to that block. For example: default WP image gallery block: I added target=”_blank” to the links that open the attachment (not possible via the block settings).

    After saving the changes the “Unexpected or Invalid Content” pops up which confuses other users of the cms and they press one of the suggested buttons “Solve” or “Convert to HTML” since the block cannot be edited anymore.

    My suggestion: give admin users the option to “Ignore”:
    – this removes the message “Unexpected or Invalid Content” in the body content and show a message “Block has been edited by admin” in the sidebar!
    – this removes the buttons “Solve” or “Convert to HTML” and show button “Show edits” (similar to button “Solve”) in the sidebar (only for admin users)!
    ——————————
    Ideally I would suggest being able to ignore the message and continue to be able to edit the block, but I think this is probably not possible?
    ——————————

    The blog I need help with is: (visible only to logged in users)

  • Hi! Thanks for the suggestion. I want to say it’s a bug, though, if the HTML is valid.

    Could you send a link to the affected post or page, and also share the HTML here?

    You can paste the HTML, highlight it, then use the code button here so we’ll be able to see it.

  • Unknown's avatar

    `<figure class=”wp-block-gallery columns-3 is-cropped”><ul class=”blocks-gallery-grid”><li class=”blocks-gallery-item”><figure><a href=”https://terencetengker.nl/ditholding-nl/”><img src=”https://terencetengker.nl/wp-content/uploads/2020/03/ditholdingnl-700×504.jpg” target=”_blank” alt=”” data-id=”404″ data-full-url=”https://terencetengker.nl/wp-content/uploads/2020/03/ditholdingnl.jpg” data-link=”https://terencetengker.nl/ditholding-nl/” class=”wp-image-404″/></a><figcaption class=”blocks-gallery-item__caption”>3</figcaption></figure></li><li class=”blocks-gallery-item”><figure><a href=”https://terencetengker.nl/orga-architect-nl/”><img src=”https://terencetengker.nl/wp-content/uploads/2020/03/orga-architectnl-700×504.jpg” alt=”” data-id=”396″ data-full-url=”https://terencetengker.nl/wp-content/uploads/2020/03/orga-architectnl.jpg” data-link=”https://terencetengker.nl/orga-architect-nl/” class=”wp-image-396″/></a></figure></li><li class=”blocks-gallery-item”><figure><a href=”https://terencetengker.nl/melangedor-nl/”><img src=”https://terencetengker.nl/wp-content/uploads/2020/03/melangedornl-700×504.jpg” alt=”” data-id=”397″ data-full-url=”https://terencetengker.nl/wp-content/uploads/2020/03/melangedornl.jpg” data-link=”https://terencetengker.nl/melangedor-nl/” class=”wp-image-397″/></a></figure></li><li class=”blocks-gallery-item”><figure><a href=”https://terencetengker.nl/abc-vision-nl/”><img src=”https://terencetengker.nl/wp-content/uploads/2020/03/abc-visionnl-700×504.jpg” alt=”” data-id=”403″ data-full-url=”https://terencetengker.nl/wp-content/uploads/2020/03/abc-visionnl.jpg” data-link=”https://terencetengker.nl/abc-vision-nl/” class=”wp-image-403″/></a></figure></li><li class=”blocks-gallery-item”><figure><a href=”https://terencetengker.nl/larex-eu/”><img src=”https://terencetengker.nl/wp-content/uploads/2020/03/larexeu-700×504.jpg” alt=”” data-id=”401″ data-full-url=”https://terencetengker.nl/wp-content/uploads/2020/03/larexeu.jpg” data-link=”https://terencetengker.nl/larex-eu/” class=”wp-image-401″/></a></figure></li><li class=”blocks-gallery-item”><figure><a href=”https://terencetengker.nl/enjoybranding-nl/”><img src=”https://terencetengker.nl/wp-content/uploads/2020/03/enjoybrandingnl-700×504.jpg” alt=”” data-id=”405″ data-full-url=”https://terencetengker.nl/wp-content/uploads/2020/03/enjoybrandingnl.jpg” data-link=”https://terencetengker.nl/enjoybranding-nl/” class=”wp-image-405″/></a></figure></li></ul></figure>

  • Unknown's avatar

    I pasted the code where I added target=”_blank” to the first image href. It doesn’t matter if you add it to one or all HREF. WordPress indicates invalid HTML.

  • Thanks for that, could you also share a link to the post or page where you’ve added this code?

  • Unknown's avatar
  • Your site is not hosted with WordPress.com. It is a site using the open-source WordPress software (from WordPress.org) but hosted with elsewhere.

    Because WordPress.com and WordPress.org are two entirely separate entities, we cannot access files or data for sites that are hosted elsewhere, so WordPress.com staff can only assist with sites that are hosted on our servers. You can find more information here about the differences between WordPress.org software and WordPress.com: https://wordpress.com/support/com-vs-org/

    https://wordpress.org/support/ is a great resource for sites using the open source WordPress.org software, and you can find support for that at: https://wordpress.org/support/forums/

    Your hosting provider’s support team may also be able to assist.

  • The topic ‘Button "Ignore" Unexpected or Invalid Content’ is closed to new replies.