First, I want to say i'm not convinced the problem lies within Page Manager, it could be core.
Problem/Motivation
- Create a new page manager page
- Create a new display variant, "Panels" page or a core Blocks Page will do.
- Add a views block to the page and save everything.
- Validate the newly created page_variant config object, either using simpletest or with the below snippet:
// Register the schema validator service.
services:
simpletest.config_schema_checker:
class: Drupal\Core\Config\Testing\ConfigSchemaChecker
arguments: ['@config.typed']
tags:
- { name: event_subscriber }
// Validate the page variant you created.
$c = \Drupal::service('config.manager')->loadConfigEntityByName('page_manager.page_variant.block_page');
$c->save();
The block will fail the config schema checker with the settings specific to views blocks. This isn't specific to views, it also does it for other modules that add additional keys to blocks such as twitter_block.
Proposed resolution
Not sure...
Remaining tasks
Debug
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Comments
Comment #2
berdirHave you seen #2391925: Ensure page_manager config schema is valid? Do you have the latest core version?
Comment #3
benjy commentedYes I saw that, I was using 8.0.2 but with the latest patch from #2392057: Config schema fails to expand dynamic top-level types applied, this worked for me when I was using the block_page_layout example module and the original patch I wrote in 2392057.
I'll try turn the STR in the issue summary into a test.
EDIT: I was also using the latest ctools, page_manager and panels.
Comment #4
gábor hojtsyWould be nice to see the actual issues reported with the schema, that helps to look at the schema and see if there are issues.
Comment #5
tim.plunkettCan you try to reproduce without panels or layout_plugin, and just use the "Block Page" variant provided by page manager?
And try it with a menu block, those are easier to debug.
I tested this the other day and it worked. And I thought we had automated tests too but I guess not.
I would not be surprised if it was broken in panels or layout_plugin though...
Comment #6
dsnopekAs the person who wrote the schemas for panels and layout_plugin, I agree with Tim that it could be broken there. :-) I'll take a look today and see how things are looking now that #2392057: Config schema fails to expand dynamic top-level types is in, but I'm still pretty much a noob with regard to config schema, and would love help getting them all in order!
Comment #7
dsnopekI just did some testing, using Config Inspector to see if the schema is correct.
Using "Block page" and the "Admininstration" menu block - the config entity for the variant is listed as "Correct".
Using "Panels" and the same "Administration" menu block - it shows "2 errors" however, when I click "List" it doesn't give me anything in the error column, so I'm not sure what the actual error is. :-/
I suppose it's possible that config_inspector needs to be updated for the latest core changes?
Anyway, there does appear to be some issue with Panels...
Comment #8
andypostHere's 2 places which cause warnings when config:inspect executed
Probably there's more places
Comment #9
andypostThere's more places to clean-up
Comment #10
sorlov commentedComment #12
sorlov commentedThese issues seems to be fixed already in https://www.drupal.org/i/3410270
Comment #14
japerryHmm... I'm not quite sure, the D11 tests are still failing the schema check, even with Patch #8 being committed to head. Updating MR so we can see tests running.
Comment #18
joelpittetThanks everyone for the work and discussion here over the years.
The remaining Page Manager schema issue raised in this thread has since been addressed as part of the newer condition schema fix in #3581823: Fix tests related to body field missing. The earlier patch (#8) helped move things forward, but wasn’t a complete solution on its own.
The current branch now passes the relevant Drupal 11 schema tests, so this issue is no longer needed (correct me if I am wrong, happy to look closer).
Closing as outdated/duplicate of #3581823: Fix tests related to body field missing.