- Issue created by @seb_r
- 🇩🇪Germany stefan.korn Jossgrund
@Seb_R: I am on the same end and can confirm that removal of only one item in a multivalued field does not trigger USAGE_REGISTER event correctly.
- 🇩🇪Germany stefan.korn Jossgrund
testing a bit, it seems to me that just removing this return statement solves the issue.
if (($source_entity instanceof RevisionableInterface) && $source_entity->getRevisionId() != $source_entity->original->getRevisionId() && $source_entity->hasField($field_name) && !$source_entity->{$field_name}->isEmpty()) { $this->trackOnEntityCreation($source_entity); //return; }
It seems not to introduce problems on first quick look. But really need to understand why this return statement was introduced.
- 🇫🇷France seb_r
Hi,
I just ran a few tests, and removing the "return" here will make the event trigger 2 times on the items that are in the new revision.
I don't have much time to dig in, so I guess I'll try with this for now, as the result is what I need.Have a good day,
Seb