Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Changing fonts in site editor causes blocks to break #73624

Open brittanygray902 opened 1 year ago

brittanygray902 commented 1 year ago

Quick summary

User has the theme Twenty Twenty-Three

When changing font for blocks the block is broken and shows error message.

"This block contains unexpected or invalid content. Attempt Block Recovery."

Steps to reproduce

(Could not reproduce on my own test site)

Steps to reproduce:

Set theme: Twenty Twenty -three

  1. Open Site Editor
  2. Select block > Change font (Playfair Display seems to break blocks every time so I'd try this one)

What you expected to happen

When changing the fonts you expect the font to change / apply, with no errors.

What actually happened

When changing fonts on a test site I did not see the same error message come up.

However, on the user's site they continue to get the error when changing fonts - specifically they notice this when changing to the font Playfair Display.

The error message is removed and blocks display / function properly when the default font is set back.

Impact

One

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple

Logs or notes

Theme: Twenty Twenty-Three Follow up: 5979020-ZD

github-actions[bot] commented 1 year ago

Support References

This comment is automatically generated. Please do not edit it.

sophiegyo commented 1 year ago

I can replicate this on my Simple test site, and I am very confident that it is specific to when a font is applied to a block that sits inside a parent block which allows nested blocks, e.g. group or column block.

I was testing it out before I found this GH report - here's my recording:

https://user-images.githubusercontent.com/36608681/220928902-990ac6bf-e00f-45dd-be69-00e0543cf430.mp4

sophiegyo commented 1 year ago

I just tested again and I found that this workaround can help:

  1. Ensure paragraph block does not have a custom font
  2. Set font on its parent container instead
  3. Save, refresh
  4. No error.
kavyagokul commented 1 year ago

πŸ“Œ SCRUBBING : RESULT

πŸ“Œ FINDINGS/SCREENSHOTS/VIDEO

πŸ“Œ ACTIONS

eoinsav commented 1 year ago

I am seeing this on my personal site too. I have multiple Paragraph Blocks inside a Group Block and each of them has a Custom Font added through the default Paragraph Block Settings. They all have the Attempt Block Recovery error.

I am getting the same on the Timeline Block when I have Paragraph Blocks with a custom font inside the Timeline Entries.

I have multiple fonts in the container which is why the above workaround doesn't work.

Markup 2023-09-18 at 13 25 11

Clicking Attempt Block Recovery gets rid of the notice until the next time I open the editor. Clicking Resolve instead of Attempt Block Recovery just strips the Block of all the customizations, which isn't ideal.

eduardozulian commented 9 months ago

This is also happening on 7617764-zen

liviopv commented 8 months ago

Adjusting the labels and moving to the non-deprecated board based on p58i-gz0-p2