Loading
fix: #3621847 Remove the nineteen Canvas Component config entities shipped in the fallback state, which log 477 PHP warnings on every install
Issue: https://www.drupal.org/project/horizonaid/issues/3621847
Nineteen canvas.component.sdc.vartheme_bs5_horizonaid.*.yml files shipped in config/ with active_version: fallback and last_active_version: '' — an EMPTY version string. Drupal\canvas\Entity\Component::sourcePluginCollection() then looks up $this->versioned_properties[''], which is an undefined array key returning NULL, followed by two array offsets on that NULL. Installing the recipe logged 477 PHP warnings because of it.
What this MR does:
- Deletes the eighteen theme-internal Component config files, and the eighteen matching
disable: []config actions inrecipe.yml. Sixteen of those SDCs carrynoUi: true, so Canvas never creates a Component for them at all — the recipe was creating them in a broken state purely so its own disable actions had something to act on. (input-checkboxandinput-submitare the two not yet flagged in the theme: drupal.org/project/vartheme_bs5_horizonaid/issues/3621846.) - Replaces
config/canvas.component.sdc.vartheme_bs5_horizonaid.taxonomy.ymlwith a real export. That one IS used — the recipe's own Canvas trees placesdc.vartheme_bs5_horizonaid.taxonomyatcomponent_version: 3351b78763f50152— but it shippedstatus: false,active_version: fallbackand no such version, so the badge rendered through Canvas's fallback component instead of itself.
Verified on a clean ddev composer create-project drupal/cms + ddev composer require drupal/horizonaid + ddev drush si -y ../recipes/horizonaid:
before: 477 warnings after: 0
fallback components after install: 0
canvas.component.sdc.vartheme_bs5_horizonaid.taxonomy: status=true active_version=3351b78763f50152AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
Edited by Rajab Natshah