After placing the block and clearing the cache, the page reports:
Error: Call to a member function access() on null in Drupal\block\BlockAccessControlHandler->checkAccess() (line 124 of core/modules/block/src/BlockAccessControlHandler.php).
When re-importing the configuration without provider, the drush configuration import (cex) complains:
The "views_exposed_filter_blocks_block" was not found
The reason seems to be, that plugin
in the config is being detected as null
, while it should be views_exposed_filter_blocks
:
uuid: 524a114b-6c8a-4efa-a245-1b7742958d14
langcode: de
status: true
dependencies:
module:
- fences_block
- views_exposed_filter_blocks
theme:
- drowl_child
third_party_settings:
fences_block:
fences:
sections:
wrapper:
element: ''
classes: ''
label:
element: ''
classes: ''
content:
element: ''
classes: ''
id: my_example_theme_search
theme: my_example_theme
region: footer_cta
weight: 0
provider: views_exposed_filter_blocks
plugin: null
settings:
id: views_exposed_filter_blocks_block
label: 'Nicht gefunden, was Sie suchen?'
label_display: visible
provider: views_exposed_filter_blocks
view_display: 'zmp_search:page_search'
visibility: { }
Changing the config like this, resolves the issue:
uuid: 524a114b-6c8a-4efa-a245-1b7742958d14
langcode: de
status: true
dependencies:
module:
- fences_block
- views_exposed_filter_blocks
theme:
- drowl_child
third_party_settings:
fences_block:
fences:
sections:
wrapper:
element: ''
classes: ''
label:
element: ''
classes: ''
content:
element: ''
classes: ''
id: my_example_theme_search
theme: my_example_theme
region: footer_cta
weight: 0
provider: views_exposed_filter_blocks
plugin: views_exposed_filter_blocks_block
settings:
id: views_exposed_filter_blocks_block
label: 'Nicht gefunden, was Sie suchen?'
label_display: visible
provider: views_exposed_filter_blocks
view_display: 'zmp_search:page_search'
visibility: { }
(with provider: views_exposed_filter_blocks
) and the block works as expected.
But the question is, why the plugin isn't being detected correctly. I already compared the implementation in the module to https://www.drupal.org/docs/creating-modules/creating-custom-blocks/crea... β and can't find a mistake.
Active
1.0
Code