Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56184 closed defect (bug) (fixed)

register_block_type does not recognise "ancestor" block setting

Reported by: lovor's profile lovor Owned by: gziolo's profile gziolo
Milestone: 6.0.2 Priority: normal
Severity: normal Version: 6.0
Component: Editor Keywords: has-patch fixed-major has-unit-tests
Focuses: ui Cc:

Description

When registering block through PHP, using register_block_type function, newly introduced "ancestor" block setting in block.json is not recognised. It works though, when block is registered from javascript.

Attachments (1)

56184.diff (950 bytes) - added by lovor 2 years ago.
Patch for #56184 - adding 'ancestor' mapping

Download all attachments as: .zip

Change History (8)

@lovor
2 years ago

Patch for #56184 - adding 'ancestor' mapping

#1 @antonvlasenko
2 years ago

  • Keywords needs-testing added

#2 @gziolo
2 years ago

  • Owner set to gziolo
  • Status changed from new to assigned

Great catch @lovor. Thank you so much for including the patch. I will take care of fixing this issue now.

#3 @gziolo
2 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 53718:

Editor: Fix register_block_type does not recognise ancestor block setting

When registering block through PHP, using register_block_type function, newly introduced ancestor block setting in block.json was not recognised. It worked though, when block is registered from JavaScript.

Props lovor, annezazu.
Fixes #56184.

#4 @gziolo
2 years ago

  • Keywords needs-testing removed
  • Milestone changed from Awaiting Review to 6.0.2

#5 @gziolo
2 years ago

  • Keywords fixed-major has-unit-tests added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to backport changes to 6.0 branch in case 6.0.2 release happens.

#6 @SergeyBiryukov
2 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 53923:

Editor: Fix register_block_type does not recognise ancestor block setting.

When registering block through PHP, using register_block_type function, newly introduced ancestor block setting in block.json was not recognised. It worked though, when block is registered from JavaScript.

Props lovor, annezazu, gziolo.
Merges [53718] to the 6.0 branch.
Fixes #56184.

This ticket was mentioned in Slack in #core by costdev. View the logs.


2 years ago

Note: See TracTickets for help on using tickets.