Skip to content

Button Blocks are failing to resolve on web #2158

@chipsnyder

Description

@chipsnyder

Describe the bug
When adding a button block to the app and opening on the web the block displays the error "This block contains unexpected or invalid content."

Following the blocks suggested resolution strategy turns it into a paragraph block.
Failing example

<!-- wp:button {"className":"wp-block-button__link"} -->
<a class="wp-block-button wp-block-button__link">Button 1</a>
<!-- /wp:button -->

Successful example

<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link"></a></div>
<!-- /wp:button -->

The issue appears to be related to {"className":"wp-block-button__link"}

To Reproduce
Steps to reproduce the behavior:

  1. Add a Button block to a post
  2. Save the post
  3. Open the same post on the web
  4. Block shows a conversion error

Expected behavior
Block should be understood by the web.

Screenshots

App HTML:
image

Web Conflict:
image

Web Resolution Suggestion:
image

Smartphone (please complete the following information):

  • Device: Android Pixel 3a
  • OS: Android X
  • Version: 29

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions