Problem/Motivation
We are currently testing a module, which installs a page_manager "page" and "page_variant" on installation. When testing the module, the tests will throws the following error:
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for page_manager.page.admin_dashboard with the following errors: page_manager.page.admin_dashboard:access_conditions.0.permission missing schema
Here are the page_manager.ymls we use in our config/install directory:
page_manager.page_variant.admin_dashboard-layout_builder-0.yml:
langcode: de
status: true
dependencies:
config:
- page_manager.page.admin_dashboard
enforced:
module:
- user_permission_condition
- drowl_admin_dashboard
id: admin_dashboard-layout_builder-0
label: 'Layout Builder'
variant: layout_builder
variant_settings:
id: layout_builder
uuid: a80386f0-6c82-4a18-bca1-57ff2c5927ec
label: null
weight: 0
sections:
-
layout_id: admin_dashboard_default
layout_settings: { }
components:
b4d9a23a-96f0-4abc-81c3-b23b56301175:
uuid: b4d9a23a-96f0-4abc-81c3-b23b56301175
region: left_middle
configuration:
id: 'views_block:user_admin_people-block_1'
label: ''
provider: views
label_display: visible
views_label: ''
items_per_page: none
context_mapping: { }
additional: { }
weight: 0
f453a8a0-fd16-4e2a-8a3a-8dacbdc5f085:
uuid: f453a8a0-fd16-4e2a-8a3a-8dacbdc5f085
region: right_bottom
configuration:
id: system_powered_by_block
label: 'Powered by Drupal'
provider: system
label_display: '0'
context_mapping: { }
additional: { }
weight: 0
a31b8443-2044-4a96-9dda-963418614c6f:
uuid: a31b8443-2044-4a96-9dda-963418614c6f
region: right_top
configuration:
id: 'views_block:user_profile_display-block_1'
label: ''
provider: views
label_display: visible
views_label: ''
items_per_page: none
context_mapping:
uid: '@user.current_user_context:current_user'
additional: { }
weight: 0
d5cdb74c-7e9b-44d6-87f2-91143c820130:
uuid: d5cdb74c-7e9b-44d6-87f2-91143c820130
region: right_top
configuration:
id: 'menu_block:admin-quicklinks'
label: 'Admin Quicklinks'
provider: menu_block
label_display: visible
level: 1
depth: 0
expand: 0
parent: 'admin-quicklinks:'
render_parent: false
suggestion: admin_quicklinks
context_mapping: { }
additional: { }
weight: 1
4897f490-9317-44ad-bc15-abf8cb7d4401:
uuid: 4897f490-9317-44ad-bc15-abf8cb7d4401
region: right_top
configuration:
id: 'views_block:who_s_online-who_s_online_block'
label: ''
provider: views
label_display: visible
views_label: ''
items_per_page: '5'
context_mapping: { }
additional: { }
weight: 4
e675f1ee-8561-48be-8986-1bece993b929:
uuid: e675f1ee-8561-48be-8986-1bece993b929
region: left_top
configuration:
id: 'menu_block:admin'
label: Verwaltung
provider: menu_block
label_display: visible
level: 1
depth: 0
expand: 1
parent: 'admin:admin_toolbar_tools.add_content'
render_parent: false
suggestion: admin_tiles
context_mapping: { }
additional: { }
weight: 0
d0bbfe4e-ab8d-4e56-9ee0-668b3b1cb5c6:
uuid: d0bbfe4e-ab8d-4e56-9ee0-668b3b1cb5c6
region: left_top
configuration:
id: 'views_block:content-block_1'
label: ''
provider: views
label_display: visible
views_label: ''
items_per_page: none
context_mapping: { }
additional: { }
weight: 1
third_party_settings: { }
page: admin_dashboard
weight: 0
selection_criteria: { }
selection_logic: and
static_context: { }
page_manager.page.admin_dashboard.yml:
langcode: de
status: true
dependencies:
enforced:
module:
- user_permission_condition
- drowl_admin_dashboard
id: admin_dashboard
label: 'Admin Dashboard'
description: 'Administrative dashboard as helpful overview and entry point for site maintainers.'
use_admin_theme: true
path: /admin/dashboard
access_logic: and
access_conditions:
-
id: user_permission
permission: 'access drowl admin dashboard'
negate: false
context_mapping:
user: current_user
parameters: { }
Our module is called drowl_admin_dashboard
Here are screenshots of the relevant settings:


Maybe somebody knows what the problem could be, since page_manager defines "access_conditions" in the schema definition. Maybe the page_manager schema definition is faulty, or we have a faulty definition in one of our ymls?
Help would be appreciated. :)
| Comment | File | Size | Author |
|---|---|---|---|
| image2.png | 22.85 KB | grevil | |
| image.png | 58.1 KB | grevil |
Issue fork user_permission_condition-3271390
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybodyConfirming. The schema wasn't modified, just exported from the UI configuration.
Comment #3
anybodyMaintainer feedback would be highly appreciated :) Thanks!!
Comment #4
anybodyGuess this is wrong in page_manager as the relevant config (plugin condition) comes from user_permission_condition. Moving it over there!
Comment #5
anybodySimilar issue for Entity Field Condition: #3115970: Provide config schema for condition plugin settings
Comment #6
geek-merlinYop, schema is missing. Fix is analogous to the related issue. MR appreciated.
Comment #7
grevil commentedThanks for the fast reply @geek-merlin! On it :)
Comment #9
grevil commentedAlright, I added the schema and basic installation / uninstallation tests for the module (originally to show, that the schema is missing).
Comment #10
anybodyThanks @Grevil, looks good to me, but let's wait for maintainer feedback. RTBC+1
Comment #11
geek-merlinCode LGTM. Also i like the 200/install/uninstall test.
Does it work for you?
Comment #12
anybodyComment #13
grevil commented@geek-merlin sort of! At least we get different errors, which are unrelated to user_permission_condition!
So I'd say this is fixed! (And a partial fix for our related issue)
Comment #14
anybodyConfirming RTBC, the follow-up issue Grevil mentioned has nothing to do with this module. So lights are green, I think.
Comment #15
geek-merlinGreat.
Comment #16
geek-merlinComment #18
geek-merlinCommitted, thanks!
Comment #19
anybodyThank you, Axel! :)
Comment #20
grevil commentedThx @geek-merlin!