- 🇺🇸United States dcam
Dumb question but see
$this->container->get('entity_type.bundle.info')->clearCachedBundles();
is needed to get tests to pass now. Could this be a breaking change for a number of contrib tests?Actually, that seems like a smart question. It's been a hot minute since I worked on this issue, but I think the problem can occur if a test creates a bundle at run time, requiring a cache clear. It's undoubtedly a possibility.
- 🇺🇸United States smustgrave
Dumb question but see
$this->container->get('entity_type.bundle.info')->clearCachedBundles();
is needed to get tests to pass now. Could this be a breaking change for a number of contrib tests? - 🇺🇸United States bradjones1 Digital Nomad Life
Thanks for taking a look and catching that. Feel free to give a shot at merging the MRs, as it were, or I'll try to loop back around on this "soon."
One thing the previous MR's fail to account for are computed fields with differing cache contexts. This is currently not used in core, but is supported, see
Drupal\entity_test\Plugin\Field\ComputedTestCacheableStringItemList
. Perhaps my addition can be rebased on the already existing cache bubbling for entity reference fields.- @duivw opened merge request.
- First commit to issue fork.
- 🇺🇸United States xjm
Agreed @fago; any issue that implements a fix for this can be treated as a critical UX bugfix (even if it requires a feature or API addition).
- 🇦🇹Austria fago Vienna
I also ran into this and opened 📌 Deleting filter formats may result in data loss Active for issue I faced as consequence: deletion of text item fields that have the text format as "allowed_format". I do think we should fix both, this issue and 📌 Deleting filter formats may result in data loss Active .
Checking on the proposed solutions I think both are viable. I agree that MR 12404 is the best approach though. Since it's a generally new feature, I guess it's best done over at [#579743]?
Looks like my proposed resolution in #16 overlaps a lot with 🐛 Config entities implementing EntityWithPluginCollectionInterface should ask the plugins to react when their dependencies are removed Needs work and might make this a duplicate of that.