Problem/Motivation
When you enable the Recipes source to view local recipes, the Recommended add-ons source stops working -- it no longer shows any results. Disabling the Recipes source doesn't fix it either, still says "No projects found".
Steps to reproduce
- Install Drupal CMS
- Enable the Recipes source
- Visit Recommended add-ons and see there are no results
Proposed resolution
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | project_browser-settings_form_wipes_source_config-3574922-2.patch | 937 bytes | velmir_taky |
Issue fork project_browser-3574922
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
velmir_taky commentedRoot cause
SettingsForm::submitForm()resets every enabled source's configuration to an empty array[]when saving. This wipes any per-source settings that were previously configured.The recommended source stores its
uri(the URL to a curated YAML project list) in its source configuration within enabled_sources. When a user toggles any source (e.g. enabling Recipes) and saves the form, theuriis lost.Recommended::loadProjects()then seesuri = NULLand returns zero results.Disabling the Recipes source afterward does not restore the Recommended source because the
uriwas already wiped from config on the previous save.Fix
The one-line change in
SettingsForm::submitForm()preserves existing per-source configuration instead of resetting it to []:Sources that were previously disabled and are now being enabled still get
[](which correctly triggers defaults viadefaultConfiguration()).Steps to test
uri)/admin/config/development/project_browserand enable the Recipes sourceComment #4
velmir_taky commentedThe failing test
testApplyMultipleRecipesappears to be a pre-existing flaky test unrelated to this patch. The fix only modifiesSettingsForm::submitForm()to preserve existing source configuration when saving.Comment #5
pameeela commentedComment #6
phenaproximaAll PHPUnit test jobs are failing. It seems unlikely that they would all break, on the same test, for the same reason, if this patch had not broken something. This probably needs further investigation/work.
Comment #7
velmir_taky commentedCleaned up MR !880 — it now contains only the one-line
SettingsForm::submitForm()fix.I investigated the
testApplyMultipleRecipesfailure extensively. Root cause: Svelte'sbind:valueon the searchinputrelies on input events, but Selenium'ssetValue()in CI (Selenium Grid + headless Chrome) doesn't reliably trigger them. I trieddispatchEvent('input')+ JS wait for title change — passes locally 3/3 but still fails in CI. This is a pre-existing flaky test that fails on the2.1.xbranch as well, unrelated to theSettingsFormfix.17/18 InstallerUi tests pass. All other test suites pass.