First, I want to say i'm not convinced the problem lies within Page Manager, it could be core.

Problem/Motivation

  1. Create a new page manager page
  2. Create a new display variant, "Panels" page or a core Blocks Page will do.
  3. Add a views block to the page and save everything.
  4. 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

CommentFileSizeAuthor
#8 2661710-8.patch1.45 KBandypost
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

benjy created an issue. See original summary.

berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Have you seen #2391925: Ensure page_manager config schema is valid? Do you have the latest core version?

benjy’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active

Yes 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.

gábor hojtsy’s picture

Would be nice to see the actual issues reported with the schema, that helps to look at the schema and see if there are issues.

tim.plunkett’s picture

Can 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...

dsnopek’s picture

As 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!

dsnopek’s picture

I 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...

andypost’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB

Here's 2 places which cause warnings when config:inspect executed

 [warning] Undefined array key "type" Mapping.php:143
 [warning] Undefined array key "type" Mapping.php:143
 [warning] Undefined array key "type" Mapping.php:143
 [warning] Undefined array key "type" Mapping.php:143

Probably there's more places

andypost’s picture

Status: Needs review » Needs work

There's more places to clean-up

sorlov’s picture

Version: 8.x-1.x-dev » 8.x-4.x-dev

sorlov’s picture

Status: Needs work » Needs review

These issues seems to be fixed already in https://www.drupal.org/i/3410270

japerry made their first commit to this issue’s fork.

japerry’s picture

Hmm... 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.

bluegeek9 made their first commit to this issue’s fork.

bluegeek9 changed the visibility of the branch 8.x-4.x to hidden.

joelpittet made their first commit to this issue’s fork.

joelpittet’s picture

Status: Needs review » Closed (outdated)

Thanks 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.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.