Problem/Motivation

I'm writing some tests that enable the group and gnode modules. However, they fail with the following unless strict schema checking is disabled:

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for views.view.group_nodes with the following errors: views.view.group_nodes:display.default.display_options.filters.status.value variable type is boolean but applied schema class is Drupal\Core\TypedData\Plugin\DataType\StringData

Proposed resolution

Fix the schema issues in the view config, and ideally write a test that enables gnode along with the views module so this issue doesn't regress in the future.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

jhedstrom created an issue. See original summary.

jhedstrom’s picture

Status: Active » Needs review
StatusFileSize
new990 bytes
new1.46 KB

Here's a test that demonstrates the issue, and a fix.

The last submitted patch, 2: 2886266-02-TEST-ONLY.patch, failed testing. View results

dpagini’s picture

Status: Needs review » Reviewed & tested by the community

This looks right to me. Ran into the same problem and this fixed the issue for me.

dpagini’s picture

I'd like to give this a little bump. Seems like this has been in RTBC status for 5 months now. Is there anything preventing this from being merged in?

abramm’s picture

Seems like the config schema was fixed some time ago; however, there's still no test.
The patch at #2 is showing the test was failing a year ago but it now passes.

I've raised a new issue to adopt the test patch from #2 and add new view test cases.

kristiaanvandeneynde’s picture

Right, thanks for spotting the missing coverage! Will commit the test-only patch. Closing the other issue as a duplicate.

kristiaanvandeneynde’s picture

Okay so a couple notes:

  • The test-only patch attached here is not the right test to see whether the schema fits. Wrote a new one that only tests whether the config installs correctly.
  • The original view actually had the right value, but Views seems to have gotten its schema wrong:
    # /core/modules/views/config/schema/views.filter.schema.yml, lines 156-157
    views.filter_value.boolean:
      type: string
    
kristiaanvandeneynde’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.11 KB

Status: Needs review » Needs work

The last submitted patch, 9: group-2886266-9.patch, failed testing. View results

kristiaanvandeneynde’s picture

Status: Needs work » Needs review

Hmm, tests go green locally; retesting. Also opened #3013603: views.filter_value.boolean uses incorrect schema type 'string'

kristiaanvandeneynde’s picture

Status: Needs review » Fixed
kristiaanvandeneynde’s picture

Title: Schema errors in views.view.group_nodes » Test that config passes schema inspection

Status: Fixed » Closed (fixed)

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