Problem/Motivation

As per #2183983: Find hidden configuration schema issues, several block and block content module tests would fail if we turn on full schema checking. Here is a patch to expose those errors and fix them. A subset of issues there.

Proposed resolution

Find and fix the issues.

Remaining tasks

Fix them.

User interface changes

None.

API changes

None except fixed schemas.

Files: 
CommentFileSizeAuthor
#30 2379697-block-schema-fix-30-same-as-25.patch14.63 KBGábor Hojtsy
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,770 pass(es). View
#26 interdiff.txt4.21 KBGábor Hojtsy
#25 interdiff.txt2.28 KBGábor Hojtsy
#25 2379697-block-schema-fix-25.patch14.63 KBGábor Hojtsy
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,757 pass(es). View
#23 2379697-block-schema-fix-23.patch12.63 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,638 pass(es), 0 fail(s), and 2 exception(s). View
#19 interdiff.txt2.34 KBGábor Hojtsy
#19 2379697-block-schema-fix-19.patch14.35 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,573 pass(es), 5 fail(s), and 2 exception(s). View
#17 interdiff.txt3.59 KBGábor Hojtsy
#17 2379697-block-schema-fix-17.patch12.01 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,573 pass(es), 5 fail(s), and 2 exception(s). View
#15 2379697-block-schema-fix-15.patch9.06 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,464 pass(es), 1 fail(s), and 1 exception(s). View
#12 2379697-block-schema-fix-12.patch9.02 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch 2379697-block-schema-fix-12.patch. Unable to apply patch. See the log in the details link for more information. View
#12 interdiff.txt2.38 KBGábor Hojtsy
#10 interdiff.txt753 bytesGábor Hojtsy
#10 2379697-block-schema-fix-10.patch9.11 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,315 pass(es), 1 fail(s), and 2 exception(s). View
#7 interdiff.txt1.59 KBGábor Hojtsy
#7 2379697-block-schema-fix-7.patch8.74 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View
#4 interdiff.txt1.43 KBGábor Hojtsy
#4 2379697-block-schema-fix-4.patch8.54 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View
#3 2379697-block-schema-fix.patch7.83 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View
#3 interdiff.txt5.24 KBGábor Hojtsy
#1 2379697-config-schemas.patch2.59 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 80,819 pass(es), 3 fail(s), and 4 exception(s). View

Comments

Gábor Hojtsy’s picture

FileSize
2.59 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 80,819 pass(es), 3 fail(s), and 4 exception(s). View

Status: Needs review » Needs work

The last submitted patch, 1: 2379697-config-schemas.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
5.24 KB
7.83 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View

Fixes for the fails:

1. The test view had a wrong field key, should be fields.

2. The block content translation test encounters content_translation.settings, which is impossible to provide schema for. See #2363155: content_translation.settings config is not scalable. To make these pass, we need to provide an ignore schema. I also removed the schema assert from ContentTranslationSettingsTest.php in favor of the strict checking test option.

3. The block tests use test_field types and link fields respectively and schemas were missing for those.

Gábor Hojtsy’s picture

FileSize
8.54 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View
1.43 KB

In #2183983-74: Find hidden configuration schema issues @Berdir removed the cached data setting, which is indeed not referenced anywhere. Also fixing the default value for the test field.

The last submitted patch, 3: 2379697-block-schema-fix.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 4: 2379697-block-schema-fix-4.patch, failed testing.

Gábor Hojtsy’s picture

FileSize
8.74 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View
1.59 KB

Patch did not apply anymore. Rerolled. Also moved schema ignore fix to the checker. I should have remembered we don't have iteration support on ignore.

Gábor Hojtsy’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: 2379697-block-schema-fix-7.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
9.11 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,315 pass(es), 1 fail(s), and 2 exception(s). View
753 bytes

Resolving that PHP fatal by not invoking the method I am removing :)

Status: Needs review » Needs work

The last submitted patch, 10: 2379697-block-schema-fix-10.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
2.38 KB
9.02 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch 2379697-block-schema-fix-12.patch. Unable to apply patch. See the log in the details link for more information. View

Field settings schema keys were restructured in #2370305: Refactor field type configuration schemas for DX, easier to find errors, changed for those. Also found link_type field setting on links that I previously missed for some reason.

Gábor Hojtsy’s picture

Title: Fix configuration schema issues in block and block content modules » Fix configuration schema issues in block content (indirectly link and field test) modules

Status: Needs review » Needs work

The last submitted patch, 12: 2379697-block-schema-fix-12.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
9.06 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,464 pass(es), 1 fail(s), and 1 exception(s). View

Status: Needs review » Needs work

The last submitted patch, 15: 2379697-block-schema-fix-15.patch, failed testing.

Gábor Hojtsy’s picture

Priority: Normal » Major
Status: Needs work » Needs review
Issue tags: +D8 upgrade path, +D8MI, +sprint
FileSize
12.01 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,573 pass(es), 5 fail(s), and 2 exception(s). View
3.59 KB

Marked #2358263: Adding missing configuration schema for views blocks a duplicate because the same fails can be reproduced here and they are covered by making DisplayBlockTest strict on config schema.

Incorporated the fixes from there. Also trying to remove the fields in the test blocks because there are no link_to_node title fields in views_test_data (no title field even!).

Status: Needs review » Needs work

The last submitted patch, 17: 2379697-block-schema-fix-17.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
14.35 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,573 pass(es), 5 fail(s), and 2 exception(s). View
2.34 KB

This is starting to get a bit unwieldy as the test views that are imported from views_test also expose their problems here... Anyway, we can get going with fixing those fails so long as there is an end in sight :D Fixing fails from testbot related to missing plugin_id's (no typing for schema on test fields).

Status: Needs review » Needs work

The last submitted patch, 19: 2379697-block-schema-fix-19.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Postponed

So the fails here are due to the views wizard. Duh. Opened #2381973: View wizard creates 'invalid' views out of the box, missing plugin_ids, insecure permissions. Postponing on that one.

Gábor Hojtsy’s picture

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
12.63 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,638 pass(es), 0 fail(s), and 2 exception(s). View

Rerolled.

Status: Needs review » Needs work

The last submitted patch, 23: 2379697-block-schema-fix-23.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
14.63 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,757 pass(es). View
2.28 KB

We should place blocks with label and not title, see docs and code of drupalPlaceBlock.

Gábor Hojtsy’s picture

FileSize
4.21 KB
10.42 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,596 pass(es), 1 fail(s), and 1 exception(s). View

Note sure anymore that the test views were related, let's test without them. Will incorporate the fixes to #2325269: Test and fix views in test_views directories against their configuration schema unless required here. Should make reviewing the changes easier.

Status: Needs review » Needs work

The last submitted patch, 26: 2379697-block-schema-fix-26.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review

Was a bit carried away with aiming for simplicity :D We do need the test views fixes.

Gábor Hojtsy’s picture

FileSize
14.63 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 81,770 pass(es). View

Reuploading #25 to avoid any confusion.

vijaycs85’s picture

Status: Needs review » Reviewed & tested by the community

Looks good as the changes are just adding strict config schema check and few missing field plugin elements in test... This is good to go.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed f355ada and pushed to 8.0.x. Thanks!

  • alexpott committed f355ada on 8.0.x
    Issue #2379697 by Gábor Hojtsy: Fix configuration schema issues in block...
Gábor Hojtsy’s picture

Issue tags: -sprint

Yay, thanks!

Status: Fixed » Closed (fixed)

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