Currently, when the enabled bundles of a datasource are changed, we make sure to update the tracked items accordingly, removing those from bundles no longer included in the datasource and, conversely, adding the items from newly enabled bundles. (This should use a batch, see #2574611: Unify our two task systems, but it generally works.)
However, we somehow seem to have forgotten in #2256219: Allow the content entity datasource to specify which languages to handle to do the same for the new "Languages" option. Now, when you disable a language there, the items of that language will still be tracked but refuse to be loaded. Worse yet, when enabling a new language, the existing items of that language won't be indexed. (The LanguageIntegrationTest really only works currently because this is not only broken in both directions, but because the "remove items that couldn't be loaded" functionality is broken as well.)
Comments
Comment #2
drunken monkeyComment #3
andypostLooks the proper way is subscribe to
EntityTypeEvents::DELETE&EntityTypeEvents::UPDATEevents...But when bundle entity is deleted by some code (without form api) looks there's no way to start batch
Suppose better to use queue or coming tasks #2574611: Unify our two task systems to make reactions on changes
Comment #4
drunken monkeyThis will be fixed by #2574611: Unify our two task systems.
Comment #5
drunken monkey