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
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | plugin-fix-provider-for-block-plugin-type-2884304-6-D8-do-not-test.patch | 491 bytes | ricovandevin |
Comments
Comment #2
ricovandevin commentedPatch supplied.
Comment #4
ricovandevin commentedThe 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?!
Comment #5
ricovandevin commentedComment #6
ricovandevin commentedThe 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.
Comment #7
joachim commentedI'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:
The schema for a block config entity though is in block module:
It's interesting that it's only the functional tests that are failing -- not unit or kernel.
Comment #8
berdirThis 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.