Component definitions not updating when clearing cache

Created on 3 September 2025, 8 days ago

Overview

Prior to the shift from Experience Builder to Drupal Canvas, I could easily add, update, and remove component definitions from my theme. After making the changes, I'd just have to clear the cache and all be working as expected.

With Drupal Canvas alpha1, that is no longer the case. If I remove a component, e.g. "container" within my custom theme "vsa4," I get the following error on cache clear.

Reinstalling the theme seems to be the only way to have components rediscovered as far as I can tell.

To note, this is on a fresh standard DDEV install using a settings.local.php to null out all of the cache bins for testing. The only contrib modules I have installed are fairly standard, like Admin Toolbar and the Gin themeโ€”the same as my other (identical) DDEV container with Experience Builder working as intended.

Steps to reproduce

  1. Create a Drupal Canvas page
  2. Install a custom theme with a component(s)
  3. Inspect the registered components in the page editor
  4. Rename a component definition (e.g. container.component.yml -> container.component.yml.ignore
  5. Refresh the page editor and find an error rather than the component having been removed from the list
๐Ÿ› Bug report
Status

Active

Version

1.0

Component

โ€ฆย to be triaged

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States FrankieD3

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

Merge Requests

Comments & Activities

  • Issue created by @FrankieD3
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States FrankieD3

    Additionally, I'm testing using the "group" key in the component definitions, and when I uninstall / reinstall, the component is still shown under the wrong group. For example, I renamed a group from "Atoms" to "01 Atoms" for natural sorting, and the component still shows under "Atoms" in the UI even though the exported config (checked via /admin/config/development/configuration/single/export) shows "category: '01 Atoms'", so it appears that there's another issue there as well. I'm unsure where else the DB could be holding onto this meta in such a way that it would appear after uninstalling and reinstalling the theme.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    This smells like another hook execution ordering thing. Previous one, also discovered during the rename: ๐Ÿ› Ensure element_info_alter hook runs after editor implementation Active .

  • ๐Ÿ‡ช๐Ÿ‡ธSpain penyaskito Seville ๐Ÿ’ƒ, Spain ๐Ÿ‡ช๐Ÿ‡ธ, UTC+2 ๐Ÿ‡ช๐Ÿ‡บ

    I can reproduce this with XB HEAD, so wasn't introduced with the rename.
    I guess the libraries changes introducing folders might have introduced this.

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland YevKo Espoo

    I am experiencing the same on 0.7.3-alpha1. It is PITA to rename or delete a component. Have to delete all XB pages, clear caches and what not to be able to work with canvas again

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland
  • ๐Ÿ‡ช๐Ÿ‡ธSpain penyaskito Seville ๐Ÿ’ƒ, Spain ๐Ÿ‡ช๐Ÿ‡ธ, UTC+2 ๐Ÿ‡ช๐Ÿ‡บ
  • ๐Ÿ‡ช๐Ÿ‡ธSpain penyaskito Seville ๐Ÿ’ƒ, Spain ๐Ÿ‡ช๐Ÿ‡ธ, UTC+2 ๐Ÿ‡ช๐Ÿ‡บ

    Tried git bisect this and couldn't really find the culprit. I was even able to reproduce with 0.7.4-alpha1.
    I'd treat this as a regular bug and not a regression.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain penyaskito Seville ๐Ÿ’ƒ, Spain ๐Ÿ‡ช๐Ÿ‡ธ, UTC+2 ๐Ÿ‡ช๐Ÿ‡บ

    Needs review for the approach. We would need something similar for blocks (potentially all component sources?), even if blocks don't crash that early.

    This doesn't avoid the app crashing if the component is gone and it was used on a page.

    Wondering if we should take care of this when loading the layout. IOW: it would be in some way like the "on-the-fly upgrade" for layouts/paragraphs/et al. "Upgrading" the layout when canvas loads the preview means doing the upgrade for those, but also replacing any missing component with the fallback component.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain penyaskito Seville ๐Ÿ’ƒ, Spain ๐Ÿ‡ช๐Ÿ‡ธ, UTC+2 ๐Ÿ‡ช๐Ÿ‡บ
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    Based on the MR, this looks identical to ๐Ÿ’ฌ ComponentNotFoundException: Unable to find component Active .

    Is it not exactly that? Let's please mark this as a duplicate of ๐Ÿ’ฌ ComponentNotFoundException: Unable to find component Active .

    I also therefore seriously question that this should be a beta blocker, because this has been known and raised time and time again for months? ๐Ÿ˜…

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    I could argue this either way but based on seeing this issue it doesn't seem like people could have a good experience testing Canvas without having this fixed which is why I think it would be better if we could fix this before beta. Would be helpful to understand if this is something that's difficult for us to fix so that we can weigh the delay against the impact of this issue.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States FrankieD3

    Strangely enough this seemed to be working fine on my previous DDEV container with Experience Builder 0.7.3-alpha. I'd updated to 0.7.4-alpha right before pushing over to Drupal Canvas and hadn't tested 0.7.4. Going back and looking again, it seems to be broken now, and reverting back to 0.7.3 hasn't fixed it. I don't have much more than that to go off of, but it WAS working for the past month.

    Just my two cents, but I believe that with this blocking the development of new components and even purging old meta that didn't get removed on uninstall of the source of the components (e.g. a theme), it should be a beta blocker.

    This is coming from someone who has only poked at the source, so my word carries little weight as far as figuring the difficulty of fixing this goes, but in my eyes, it's a huge DX issue with no real way to fix it on a component developer's end without cleaning out the relevant places in DB by hand.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain penyaskito Seville ๐Ÿ’ƒ, Spain ๐Ÿ‡ช๐Ÿ‡ธ, UTC+2 ๐Ÿ‡ช๐Ÿ‡บ

    This is a duplicate of ๐Ÿ’ฌ ComponentNotFoundException: Unable to find component Active

  • Now that this issue is closed, please review the contribution record.

    As a contributor, attribute any organization helped you, or if you volunteered your own time.

    Maintainers, please credit people who helped resolve this issue.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain penyaskito Seville ๐Ÿ’ƒ, Spain ๐Ÿ‡ช๐Ÿ‡ธ, UTC+2 ๐Ÿ‡ช๐Ÿ‡บ
Production build 0.71.5 2024