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:
Image 1

Image 2

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. :)

CommentFileSizeAuthor
image2.png22.85 KBgrevil
image.png58.1 KBgrevil
Command icon 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

Grevil created an issue. See original summary.

anybody’s picture

Confirming. The schema wasn't modified, just exported from the UI configuration.

anybody’s picture

Maintainer feedback would be highly appreciated :) Thanks!!

anybody’s picture

Title: Page Manager schema error while testing module which depends on page manager. » Schema error while testing module which depends on user_permission_condition
Project: Page Manager » User Permission Condition
Version: 8.x-4.x-dev » 8.x-1.x-dev

Guess this is wrong in page_manager as the relevant config (plugin condition) comes from user_permission_condition. Moving it over there!

anybody’s picture

Similar issue for Entity Field Condition: #3115970: Provide config schema for condition plugin settings

geek-merlin’s picture

Yop, schema is missing. Fix is analogous to the related issue. MR appreciated.

grevil’s picture

Thanks for the fast reply @geek-merlin! On it :)

grevil’s picture

Status: Active » Needs review

Alright, I added the schema and basic installation / uninstallation tests for the module (originally to show, that the schema is missing).

anybody’s picture

Thanks @Grevil, looks good to me, but let's wait for maintainer feedback. RTBC+1

geek-merlin’s picture

Code LGTM. Also i like the 200/install/uninstall test.
Does it work for you?

anybody’s picture

grevil’s picture

Status: Needs review » Reviewed & tested by the community

@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)

anybody’s picture

Confirming RTBC, the follow-up issue Grevil mentioned has nothing to do with this module. So lights are green, I think.

geek-merlin’s picture

Great.

geek-merlin’s picture

  • geek-merlin committed e6f8ccd on 8.x-1.x authored by Grevil
    Issue #3271390 by Grevil, Anybody, geek-merlin: Schema error while...
geek-merlin’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

anybody’s picture

Thank you, Axel! :)

grevil’s picture

Thx @geek-merlin!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.