I've tried to import my View, that worked in previous versions, to Alpha 13 and I got the The configuration property display.block_1.display_options.allow.items_per_page doesn't exist. error. I found that the configuration schema for Views block display(block.views.schema.yml) is now a boolean but in reality it is a mapping and that triggered the error.
I'm not sure what goes into the value beside items_per_page so I'm not sure if sequence or mapping is a proper type here. Therefore I'm not creating any patch

Also this bug broke the config import during installation so I'm making it a major priority.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Issue tags: +Novice, +VDC

This should be pretty easy patchable.

Berdir’s picture

Actually it should be a mapping I think? list is for a numbered list of the same sub-items, those are key/value pairs.

I don't know if this is pluggable, but I'd start with hardcoding the known example.

Berdir’s picture

Status: Active » Needs review
FileSize
565 bytes

Here's a quick patch, @dawehner, are there any other per-block override things that we need to care about?

dawehner’s picture

No, core is not written in a flexible way, on purpose.

+++ b/core/modules/block/config/schema/block.views.schema.yml
+++ b/core/modules/block/config/schema/block.views.schema.yml
@@ -18,5 +18,9 @@ views.display.block:

While you are in this file, can you remove the entry about block caching? This got removed in some other issue

Berdir’s picture

Not pluggable sounds good :)

Sure, removed that.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Thank you.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Seems like this is an indication of missing test coverage

Berdir’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
1.31 KB
2.02 KB

Most of our schema test coverage is implicit by testing our default configuration, so I simply updated the comments_recent default value and added that setting, as it was enabled but not properly exported.

With this, the install fails. The default view is a bit different, but I just openend it, resaved it and then added the setting manualy (because tryiyng to save it gives you an exception now).

The last submitted patch, 8: config-schema-block-allow-2298319-8-tests-only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 8: config-schema-block-allow-2298319-8.patch, failed testing.

Berdir’s picture

@dawehner: Hm, are the additional options real or are they just there because I resaved the old view?

Berdir’s picture

Status: Needs work » Needs review
FileSize
2.66 KB

Ok, let's see how this goes.

We'd have to re-save all the views to figure out if there's more we're missing, but that seems to be too much for this issue?

Status: Needs review » Needs work

The last submitted patch, 12: config-schema-block-allow-2298319-12.patch, failed testing.

Status: Needs work » Needs review
dawehner’s picture

We'd have to re-save all the views to figure out if there's more we're missing, but that seems to be too much for this issue?

Totally, opened a follow up for that: #2303409: Resave all the views.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

back to rtbc

alexpott’s picture

+++ b/core/modules/comment/config/install/views.view.comments_recent.yml
@@ -1,8 +1,14 @@
+dependencies: {  }

@@ -228,11 +236,7 @@ display:
-dependencies:
-  module:
-    - comment

Interesting... seems like we have a bug here.

Berdir’s picture

Opened a separate bug report for that: #2304479: Dependency on entity-type providing module missing in views

Re-added the dependency manually for now. This won't really help as the imported view is re-saved and dependencies are re-calculated (I think this is wrong but that's yet another topic)

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 18: config-schema-block-allow-2298319-18.patch, failed testing.

Berdir’s picture

Status: Needs work » Needs review
FileSize
2.68 KB

interdiff was correct but patch was the previous one.. :(

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

I think it's OK if set this back to RTBC myself, it was before, just made the small manual change that doesn't actually affect anything as it's not persisted nor checked (with and without this issue, already equally broken in HEAD).

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 518e3c9 and pushed to 8.x. Thanks!

diff --git a/core/modules/block/config/schema/block.views.schema.yml b/core/modules/block/config/schema/block.views.schema.yml
index 425c64e..53affeb 100644
--- a/core/modules/block/config/schema/block.views.schema.yml
+++ b/core/modules/block/config/schema/block.views.schema.yml
@@ -20,4 +20,4 @@ views.display.block:
       mapping:
         items_per_page:
          type: boolean
-         label: Items per page
+         label: 'Items per page'

Fixed on commit.

  • alexpott committed 518e3c9 on 8.x
    Issue #2298319 by Berdir | ivanjaros: Fixed views.display.block.allow...

Status: Fixed » Closed (fixed)

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