- 🇳🇱Netherlands megachriz
Support for referencing existing entities by email is added in ✨ Allow import of entity reference fields by email Fixed .
Hello,
Would it be possible to add the support of custom Feeds Target field ?
When mapping to an entity reference field, Feeds allows to you to lookup existing entities using several fields on that entity:
The list of field types that can be used is limited. It would be nice if a wider range of field types can be used to reference by, like the email field type for example.
This is the current implementation of EntityReference targets filterFieldTypes method.
protected function filterFieldTypes(FieldStorageDefinitionInterface $field) {
if ($field instanceof DataDefinitionInterface && $field->isComputed()) {
return FALSE;
}
switch ($field->getType()) {
case 'integer':
case 'string':
case 'text_long':
case 'path':
case 'uuid':
case 'feeds_item':
return TRUE;
default:
return FALSE;
}
}
So it is whitelist. File target class uses different black list approach where is marks filesize and filemime as non-sensible fields and all others are OK to use.
Would it be better to alter this EntityReference behaviour to match that of File? What field types are not suited as filter fields?
Core field types are:
Expand the list with field types that can be used as something to reference by. Add test coverage for each of them to make sure they can in fact be used as field to reference by.
Steps for adding test coverage, for each field:
Some of the above may not be suitable. You can remove these from the list above.
Needs work
3.0
Code
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Support for referencing existing entities by email is added in ✨ Allow import of entity reference fields by email Fixed .
Hello,
Would it be possible to add the support of custom Feeds Target field ?