Creating views using this filter leads to config that doesn't validate

Created on 19 August 2023, over 1 year ago

Problem/Motivation

Creating views using this filter leads to config that doesn't validate.

This was noticed during the implementation of unit tests in 📌 Add Gitlab CI, fix coding standards, add functional test Fixed ; we had to set

protected $strictConfigSchema = FALSE;

on Drupal\Tests\views_filters_populate\Functional\FilterTest to avoid

to avoid the following errors:

Testing /var/www/html/web/modules/contrib/views_filters_populate
E.                                                                  2 / 2 (100%)

Time: 00:02.932, Memory: 4.00 MB

There was 1 error:

1) Drupal\Tests\views_filters_populate\Functional\FilterTest::testSomething
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for views.view.test_populate_filter with the following errors: views.view.test_populate_filter:display.default.display_options.filters.populate.filters missing schema

/var/www/html/web/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php:94
/var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php:111
/var/www/html/web/core/lib/Drupal/Core/Config/Config.php:229
/var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:278
/var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:486
/var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:257
/var/www/html/web/core/lib/Drupal/Core/Entity/EntityBase.php:339
/var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
/var/www/html/web/core/modules/views/src/Tests/ViewTestData.php:49
/var/www/html/web/modules/contrib/views_filters_populate/tests/src/Functional/FilterTest.php:70
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

Steps to reproduce

Create a view using the populate filter and inspect the config using the Configuration Inspector module.

Proposed resolution

Update the views_filters_populate.schema.yml to accommodate the missing schema elements.
Set FilterTest::strictConfigSchema to TRUE (or just remove it - it will default to TRUE).

Remaining tasks

All the things.

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇬🇧United Kingdom Eli-T Manchester

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024