Not possible to change theme due to SDC dependencies
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3567586. --> Reported by: [catch](https://www.drupal.org/user/35733) >>> <h3 id="overview">Overview</h3> <p>Canvas creates a content dependency on SDCs. Because SDCs are generally being provided by themes (especially Mercury and Byte), this makes it impossible to uninstall a theme without breaking all of your canvas-enabled content.</p> <p>It's also not currently possibly to change the default theme without a fatal error due to <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3549814" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3549814</a></span> although the fatal can be worked around with the fallback component logic. The content would still be broken though.</p> <p><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-16"><a href="https://www.drupal.org/project/drupal/issues/3550019" title="Status: Postponed (maintainer needs more info)">#3550019: Add ThemeUninstallValidatorInterface similar to ModuleUninstallValidatorInterface</a></span> is open against core to prevent theme uninstallation, but that won't allow you to <em>change</em> your theme, only prevent the content breakage situation by locking you into your current theme.</p> <p>This has been discussed in slack at least three times but I was unable to find an issue either against Canvas or Drupal core.</p> <p><a href="https://drupal.slack.com/archives/C072BF486FN/p1743537967924799?thread_ts=1743523070.400569&amp;cid=C072BF486FN">https://drupal.slack.com/archives/C072BF486FN/p1743537967924799?thread_ts=1743523070.400569&amp;cid=C072BF486FN</a></p> <p><a href="https://drupal.slack.com/archives/C072JMEPUS1/p1764606236102519?thread_ts=1764599685.764009&amp;cid=C072JMEPUS1">https://drupal.slack.com/archives/C072JMEPUS1/p1764606236102519?thread_ts=1764599685.764009&amp;cid=C072JMEPUS1</a></p> <p>And most recently:</p> <p><a href="https://drupal.slack.com/archives/C072JMEPUS1/p1768422063724699">https://drupal.slack.com/archives/C072JMEPUS1/p1768422063724699</a></p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>This might need a new API in core, but I'm not sure what that is, and Canvas would be the main consumer, so opening this first - a core issue could follow.</p> <p><span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3546209" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3546209</a></span> provides something not dissimilar to what might be needed - a way to say X SDC replaces Y SDC, but that API is only available to themes and it looks like potentially both themes might need to be installed at the same time, no 'just in time' swap for non-existing SDCs.</p> <h3 id="ui-changes">User interface changes</h3> > Related issue: [Issue #3457504](https://www.drupal.org/node/3457504) > Related issue: [Issue #3463996](https://www.drupal.org/node/3463996) > Related issue: [Issue #3567413](https://www.drupal.org/node/3567413) > Related issue: [Issue #3520449](https://www.drupal.org/node/3520449)
issue