`Component::onDependencyRemoval()` should store the reason for disabling that component

Created on 3 June 2025, 3 days ago

Overview

🐛 Disabled SDC components are re-enabled after cache rebuild Active fixed auto-reenabling of disabled SDCs. But there's one (fairly rare) edge case it doesn't solve:

  1. I've got a module foo installed that provides a hello SDC
  2. if I uninstall foo, then the sdc.hello Component config entity will be disabled by \Drupal\experience_builder\Entity\Component::onDependencyRemoval()
  3. if I now reinstall foo because I realize my mistake, then sdc.hello will start working again … but it will not appear in the list of available components in the UI anymore, because it remains disabled

Proposed resolution

Update \Drupal\experience_builder\Entity\Component::onDependencyRemoval() to store the reason (\Drupal\experience_builder\ComponentIncompatibilityReasonRepository) for a component getting disabled — here that is: "dependency was removed" or something like that.
Now use the presence of that very reason as justification for conditionally calling ::enable() again.

Because the bug that #3526967 fixed was that it was being called unconditionally.

User interface changes

📌 Task
Status

Active

Version

0.0

Component

Config management

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024