Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#60530 closed defect (bug) (fixed)

Default privacy policy page not using latest block markup

Reported by: 254volkan Owned by: swissspidy
Priority: normal Milestone: 6.5
Component: Privacy Version:
Severity: trivial Keywords: has-patch commit
Cc: Focuses:

Description

There is some info being logged in the console https://i.imgur.com/3h33RE7.png
I was editing the generated privacy policy page wp-admin/post.php?post=5&action=edit.
This has not been replicated when creating a page and trying to edit it.

Attachments (1)

60530.diff (4.3 KB ) - added by swissspidy 3 years ago.

Download all attachments as: .zip

Change History (8)

#1 @swissspidy
3 years ago

  • Component AdministrationEditor
  • Focuses administration removed
  • Keywords has-dev-note removed

#2 @swissspidy
3 years ago

  • Version trunk

#3 @skorasaurus
3 years ago

  • Resolutioninvalid
  • Status newclosed

Thanks for reporting.

This behavior is intentional and does not mean that anything is broken.

What the message means is that a block's markup has been updated in the post.

When a post or page is saved in WP, the block and its markup is saved.

Over time, a block's markup https://developer.wordpress.org/block-editor/getting-started/fundamentals/markup-representation-block/ may change because bugs are fixed or new features are added in WordPress.

When a page or post is opened in the editor, WP will detect that the old markup is being used and will updated the markup to the new markup automatically and the message appears that the markup was updated.

Since a newly created page automatically uses the latest markup for each block, there is no block markup to be updated; thus no message is displayed.

#4 @swissspidy
3 years ago

  • Component EditorPrivacy
  • Keywords has-patch added
  • Milestone Awaiting Review6.5
  • Resolution invalid
  • Status closedreopened

Actually, the Privacy Policy page is a new page, and it doesn't currently use the latest markup.

So the page's content needs to be updated in \WP_Privacy_Policy_Content::get_default_content().

The logged message is:

New content generated by `save` function:

<h2 class="wp-block-heading">Where your data is sent</h2>

Content retrieved from post body:

<h2>Where your data is sent</h2>

So we'll have to turn all the <h2> in that method to <h2 class="wp-block-heading">

@swissspidy
3 years ago

#5 @swissspidy
3 years ago

  • Keywords commit added
  • Summary Console log showing Updated Block: core/headingDefault privacy policy page not using latest block markup

#6 @swissspidy
3 years ago

  • Owner set to swissspidy
  • Status reopenedaccepted

#7 @swissspidy
3 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 57741:

Privacy: Update default privacy page content to use latest block markup.

Avoids “Updated Block” warnings being logged to the console.

Props 254volkan, swissspidy.
Fixes #60530.

Note: See TracTickets for help on using tickets.