Problem/Motivation
Currently the available entities to be tracked are limited to ContentEntity types, which makes sense. But the taxonomy_entity_index_entity_delete function is processing on all entity types, not just the content entity ones. This is somewhat related to #3109722: Entity IDs can be strings in Drupal 8 in that it's causing issues because ConfigEntity types use strings for ids instead of numbers. I think it makes sense as a separate issue though, since all the functions of the module should really work with the same subset of entities to make it easier to maintain/test against.
Proposed resolution
Add an instanceOf check around the delete code for that function, that ensures it's a content entity. That's what the attached patch does.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | taxonomy_entity_index-delete-only-content-entites-3272755-3.patch | 1.03 KB | jacobbell84 |
| taxonomy_entity_index-delete-only-content-entites.patch | 1.02 KB | jacobbell84 |
Comments
Comment #2
larowlanCan we check for the interface here instead, ContentEntityInterface
I don't think we need to worry about tests here, so we can get this in pretty quick with the above change
Comment #3
jacobbell84 commentedGood idea, here's a new patch.
Comment #5
larowlanThanks, this will go out as 8.x-1.8