Disabled SDC components are re-enabled after cache rebuild

Created on 28 May 2025, 6 days ago

Overview

Disabled SDC components in url /admin/appearance/component or via config update, will be re-enabled just by rebuilding cache.

Proposed resolution

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Code

Created by

🇮🇱Israel heyyo Jerusalem

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @heyyo
  • 🇮🇳India JatinGupta40

    Hello @heyyo

    I attempted to replicate the issue, but as per the description everything seems to be working as expected.

    Here are the steps I followed:
    1. I manually disabled one of the components via /admin/appearance/component.
    2. The component correctly appeared under the Disabled Components tab at /admin/appearance/component/status.
    3. I cleared the cache both via Drush and through the UI at /admin/config/development/performance. The component remained disabled as expected.

    However, I did notice an inconsistency:
    When I disabled the component, it was correctly listed under the Disabled Components tab, but it was not removed from the Enabled Components tab. As a result, the component appeared in both tabs simultaneously, which could be misleading.

    This seems to indicate a UI or rendering issue where the list of enabled components is not being updated properly after a change.

    Please can you help me with more details on it.

    Thanks.

  • 🇬🇧United Kingdom thoward216

    I'm able to reproduce the same behaviour as @jatingupta40 - disabling an SDC component shows that component in both lists. Interestingly under "disabled components" the status for the component shows as "Incompatible" but the reason shows as "Manually disabled" I think that the status here maybe at least part of the problem and it should be marked as "Disabled" and not "Incompatible".

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Just yesterday I happen to have worked on this code in 📌 Version component prop definitions for SDC and Code components Active — the place to update is src/Plugin/ExperienceBuilder/ComponentSource/SingleDirectoryComponent.php.

    Great find!

    We're definitely lacking test coverage for this. I think a new ComponentSourceTestBase::testUpdateDiscovery() would probably make sense?

  • 🇮🇱Israel heyyo Jerusalem

    Exact steps with latest dev:

    0. Check the status property of the SDC Druplicon with drush, we see status: true
    drush cget experience_builder.component.sdc.experience_builder.druplicon
    1. Disable druplicon in UI : /admin/appearance/component.
    2. check again the status property. As expected status turned now to false
    You can also the SDC component is not available anymore in XB UI
    drush cget experience_builder.component.sdc.experience_builder.druplicon
    3. execute drush cr
    4. check again the status property. Status turned back to true !
    drush cget experience_builder.component.sdc.experience_builder.druplicon

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • 🇮🇳India JatinGupta40

    Thanks @heyyo for the descriptive steps.
    I have checked the scenario as per #5, and now i can reproduce the issue.

  • 🇬🇧United Kingdom thoward216

    I've found the code that looks to have been causing this, it was recently changed. I've created an MR to run all the tests and will need further testing, its likely it'll need more logic rather than just removing the enable function.

  • 🇬🇧United Kingdom thoward216

    All the tests look good. Assigning to myself to look at adding a test for this next.

Production build 0.71.5 2024