Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chi created an issue. See original summary.

Chi’s picture

Status: Active » Needs review
FileSize
488 bytes
alexpott’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

@Chi that would suggest that this functionality is not tested since if anything is saved to configuration with no schema during core testing an error is produced.

Chi’s picture

Status: Needs work » Needs review
FileSize
1.28 KB

It looks like we don't have any special tests for missing schema, at least for condition plugins. This is tested implicitly since the system throws an exception when configuration with no schema is installed. For instance, if one removes condition.plugin.request_path schema some block tests will fail because they depend on this configuration. But when it comes to condition.plugin.current_theme no tests fail. I suppose it caused by the fact that Drupal core doesn't use Current theme condition plugin at all.
I added dummy configuration to condition_test module to ensure that tests will fail if plugin configuration schema is missing. This affects both condition plugins provided by System module. I am not certain if we need to check schema for condition plugins from other modules (say user_role).

Status: Needs review » Needs work

The last submitted patch, 4: test_only-2787529-44.patch, failed testing.

Chi’s picture

Status: Needs work » Needs review
FileSize
1.75 KB
Chi’s picture

FileSize
488 bytes

Renamed the patch.

Chi’s picture

Chi’s picture

Issue summary: View changes

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

bucefal91’s picture

For what it's worth, I confirm the bug and give a thumb up on the #8 patch. Would be nice to have it committed.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

borisson_’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

The patch in #8 doesn't test the actual plugin. I think we need an integration test to test the plugin. I'm pretty sure that's what @alexpott wanted in #3.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
larowlan’s picture

yogeshmpawar’s picture

#8 still applies cleanly on 9.3.x so removing "Needs Reroll" issue tag & initiated testing against 9.3.x
Keeping it in NW for tests.

ankithashetty’s picture

Issue tags: -Needs reroll

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

tobiasb’s picture

Title: Missing schema for configuration of Current theme plugin » Missing configuration schema for current_theme condition plugin
Version: 9.4.x-dev » 9.5.x-dev
Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
7.12 KB
5.35 KB

Added missing test.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

The IS is empty so that will need to be added I believe.

Chi’s picture

@smustgrave, some issues are very straightforward. I think if the issue title describes the problem well no need to copy it into issue summary.

Ankit.Gupta’s picture

Status: Needs work » Needs review
FileSize
5.9 KB

Status: Needs review » Needs work

The last submitted patch, 29: current_theme_name-2787529-29.patch, failed testing. View results

ameymudras’s picture

Test fails for the #29 with following debug info

The website encountered an unexpected error. Please try again later.

Error: Call to a member function buildConfigurationForm() on null in Drupal\condition_test\FormController->buildForm() (line 53 of core/modules/system/tests/modules/condition_test/src/FormController.php).
call_user_func_array(Array, Array) (Line: 534)
Drupal\Core\Form\FormBuilder->retrieveForm('condition_node_type_test_form', Object) (Line: 281)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
smustgrave’s picture

@Ankit.Gupta your patch is removing a file from #25 I believe.

Also @Ankit.Gupta please upload an interdiff so that we can see the changes please.

Needs reroll from #25 please

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

rpayanm’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll

Thank you @rpayanm I see all the original files from #25 are in the MR

There a build error

Commit check failures
The last patch or MR doesn't pass commit checks, could you make sure to run ./core/scripts/dev/commit-code-check.sh before uploading a patch to make sure there are no issues with code formatting. see https://www.drupal.org/docs/develop/development-tools/running-core-devel...

rpayanm’s picture

Status: Needs work » Needs review

Sorry, get it.

smustgrave’s picture

No sorry needed. Will wait to see if it turns green and review.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

larowlan’s picture

There's no failing test only patch here, so I ran it locally to confirm it fails correctly

Here's the output

Testing Drupal\Tests\system\Functional\Condition\ConditionFormTest
E                                                                   1 / 1 (100%)R

Time: 00:01.484, Memory: 10.00 MB

There was 1 error:

1) Drupal\Tests\system\Functional\Condition\ConditionFormTest::testConfigForm
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for condition_test.settings with the following errors: condition_test.settings:visibility.current_theme missing schema

/data/app/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php:94
/data/app/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php:111
/data/app/core/lib/Drupal/Core/Config/Config.php:229
/data/app/core/lib/Drupal/Core/Config/ConfigInstaller.php:395
/data/app/core/lib/Drupal/Core/Config/ConfigInstaller.php:148
/data/app/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php:75
/data/app/core/lib/Drupal/Core/Extension/ModuleInstaller.php:319
/data/app/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
/data/app/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:474
/data/app/core/tests/Drupal/Tests/BrowserTestBase.php:543
/data/app/core/tests/Drupal/Tests/BrowserTestBase.php:362

So yep, it does ✅

larowlan’s picture

Title: Missing configuration schema for current_theme condition plugin » [Needs backport] Missing configuration schema for current_theme condition plugin
Version: 10.1.x-dev » 10.0.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)
Issue tags: +Needs reroll

Committed to 10.1.x, doesn't apply to 10.0.x - so flagging for reroll.

We can't commit this to 9.4.x as it would require an empty post update hook to clear the schema cache. We have other update hooks in 9.5/10.0/10.1 that would handle this for us.

So can we get a 10.0.x and a 9.5.x version - we have a week to get them in without needing another update hook.

  • larowlan committed c344680 on 10.1.x
    Issue #2787529 by Chi, rpayanm, tobiasb, Ankit.Gupta, smustgrave,...
quietone’s picture

quietone’s picture

Status: Patch (to be ported) » Needs review

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

quietone’s picture

@Rajeshreeputra, creating an MR on 10.1.x not needed here. The fix has already been applied to that branch. Help save our resources by reading the issue before submitting an MR for testing. Wait, why is the MR merge-able? Oh, I see that it is duplicating code. We prefer that you find ways to contribute that help the Drupal project. Therefor, credit has been removed per How is credit granted for Drupal core issues.

Spokje’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs reroll

- Patch #43 applies to both 10.0.x and 9.5.x.
- Testbot comes back green on both branches.

RTB for me.

  • catch committed c9e52a8 on 10.0.x
    Issue #2787529 by Chi, rpayanm, quietone, tobiasb, Ankit.Gupta,...
  • catch committed 2c0f591 on 9.5.x
    Issue #2787529 by Chi, rpayanm, quietone, tobiasb, Ankit.Gupta,...
catch’s picture

Version: 10.0.x-dev » 9.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.0.x and cherry-picked to 9.5.x, thanks!

catch’s picture

Title: [Needs backport] Missing configuration schema for current_theme condition plugin » Missing configuration schema for current_theme condition plugin

Status: Fixed » Closed (fixed)

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

catch’s picture

Issue summary: View changes