Making WordPress.org

Opened 13 months ago

Closed 9 months ago

Last modified 9 months ago

#6735 closed defect (bug) (worksforme)

Add support for `ancestor` block.json property for on-page block plugin search, and insertion

Reported by: randhirexpresstech's profile randhirexpresstech Owned by:
Milestone: Priority: high
Component: Plugin Directory Keywords:
Cc:

Description

If a block plugin use ancestor-child relationship blocks then there are following issue occurs:

  1. Search feature for block plugin inside the Block Editor results in child block, instead it should show the ancestor (or main) block name.

https://pbs.twimg.com/media/FoWAic3aUAArp4-

  1. After block plugin installation on-page via block-editor, Block editor try to insert child block instead of ancestor block. As a result, admin don't get to see any block inside page after block plugin installation.

Block plugin validator recently fixed a bug - Add support for ancestor block.json property https://meta.trac.wordpress.org/ticket/6465 but still there are some issues left for fixed inside block editor.

Change History (6)

This ticket was mentioned in Slack in #core-editor by randhirexpresstech. View the logs.


13 months ago

#2 follow-up: @ryelle
11 months ago

@randhirexpresstech I just tried to replicate this on the latest version of Gutenberg, and when I search for form I get the parent Form block (gutena/forms). I can't seem to get the Confirmation block to show up even if I search for confirmation. Are you still seeing this issue?

#3 in reply to: ↑ 2 @randhirexpresstech
11 months ago

Replying to ryelle:

@randhirexpresstech I just tried to replicate this on the latest version of Gutenberg, and when I search for form I get the parent Form block (gutena/forms). I can't seem to get the Confirmation block to show up even if I search for confirmation. Are you still seeing this issue?

Thanks @ryelle for checking this issue. After getting this issue we reverted back our changes in our block plugin. You can replicate this issue by changing parent to ancestor in child block's block.json in any block plugin which is submitted to wordpress.org block directory.

#4 @apedestrian
10 months ago

  • Resolution set to invalid
  • Status changed from new to closed

I am also experiencing this with my plugin that includes 3 blocks (https://wordpress.org/plugins/infinite-scroll-block/).

My top level block (apedestrian/infinite-scroll) uses core/query as the parent while my other 2 use apedestrian/infinite-scroll. Despite this, the "Loading" child block is the only result when searching infinite scroll inside the editor

I am using "parent" instead of "ancestor" inside all the block.json files

#5 @apedestrian
10 months ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#6 @apedestrian
9 months ago

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

I removed then added my plugin back to the block repository via the validator tool and that fixed my issue

Last edited 9 months ago by apedestrian (previous) (diff)
Note: See TracTickets for help on using tickets.