Problem/Motivation

The Block plugin type is not shown on /admin/structure/plugin. Also adding a field to reference a plugin of type Block results in an error.

"Plugin type "block" is unknown."

This is caused by the fact that in plugin.plugin_types.yml the Block module is set as the provider for the Block plugin type. But that plugin type is provided by core and not by the Block module.

Proposed resolution

Change the provider for the Block plugin type from 'block' to 'core' in plugin.plugin_types.yml.

Remaining tasks

Supply a patch, test, commit.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

ricovandevin created an issue. See original summary.

ricovandevin’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new491 bytes

Patch supplied.

Status: Needs review » Needs work
ricovandevin’s picture

The test fails on

The plugin type definition "plugin_configuration_schema_id" item references the configuration schema "block.settings.*" ("block.settings.[plugin_id]"), which does not exist.

maybe because the plugin type is provided by core but the configuration schema is provided by the Block module?!

ricovandevin’s picture

Issue summary: View changes
ricovandevin’s picture

Status: Needs work » Needs review
StatusFileSize
new491 bytes

The tests can probably be fixed by enabling the Block module in each test but I'm not sure that is a proper solution. Disabling testing for this patch for now.

joachim’s picture

Status: Needs review » Needs work

I'm afraid just bypassing the tests isn't an option! For this patch to get in, we need the tests to pass!

The basic schema for the block plugin is defined in core:

core/config/schema/core.data_types.schema.yml
290:block.settings.*:
291:  type: block_settings

The schema for a block config entity though is in block module:

block.block.*:
  type: config_entity
  label: 'Block'
  mapping:

It's interesting that it's only the functional tests that are failing -- not unit or kernel.

berdir’s picture

Status: Needs work » Needs review

This would only not make it show up if the block.module is actually not enabled, which I guess is very uncommon. But I just fixed a caching bug that caused the same problem in the tests.