- 🇮🇳India gaurav_manerkar Vasco Da Gama, Goa
Count should reflect total number of referenced entties.
Currently, the module as well as most of the core plugins only store one entity reference per field item.
e.g. TextFieldEmbedBase
EntityUsage::registerUsage
is only ever called with a $count
of 0 or 1.
I believe text content like this should be tracked as 2 usages rather than 1:
<a href="/sites/default/files/my-image.png">Link to image 1</a>
<a href="/sites/default/files/my-image.png">Link to image 2</a>
Reference the same entity twice from within the same entity track plugin.
e.g.
/**
* {@inheritdoc}
*/
public function getTargetEntities(FieldItemInterface $item) {
return ['file|1', 'file|1'];
}
The count should be returned as 2 references rather than 1.
EntityUsageTrackBase
should be updated so that it does a count of unique instances of the $target_entities
then uses that as the actual usage count.
As well as all the other plugins making calls to array_unique
also probably need to be removed or left as a configuration.
Provide issue fork/patch
N/A
N/A
N/A
Active
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Count should reflect total number of referenced entties.