import multi-value from csv into Field Collections - drupal

I have a simple csv file with 3 columns: NID|Key|List where NID is the node id and Key was the unique value used to add field collections to the respective node. "List" is a multi-value field separated by ";".
Example (csv file):
NID,Key,List
1,2,text1;text2;text3
1,3,text4;text4
2,123,text1
...
Field collection has an entity reference field to a taxonomy plus other fields.
Field Collections:
Field1: text;
Field2: Term Reference;
Field3: Entity Reference; <-- importer/tamper not working!
...
The field collection fields were mapped correctly, except for the field that was an entity reference to a taxonomy. I configured Feeds Tamper and the Field Collection Feeds module but nothing was imported.
Does anyone has experience importing a multi-value field from a csv file into an entity reference field within a field collection?

Using the same feeds importer configuration but instead of importing with the standalone form, it worked once it was moved to a content type form. If a content type is selected a source is imported by creating a node of that content type.

Related

Is there a module that shares one input form for multiple entity types

Drupal shares fields between multiple entity types.
Is there a module that shares an input form view for multiple entity types?
Configuring a form for each entity type is a headache.

Use the unique values from a field in one content type as a filter in another content type

I need some help with a Drupal views filter. I'm not a developer but I have been using Drupal for several years.
I have a content type named 'City/Town' that contains several fields including state and county. I'm using this content type as an entity reference field in another content type named 'Project'.
I would like to use a unique value list of States as a filter in a view of Projects.
I've installed the Views Entity Reference Filter (https://www.drupal.org/project/verf) module but I'm only able to access the entity reference title, not any of the fields that are part of the content type.
The project I'm working on is still in design phase so I can change my approach if there is a viable solution.
You need to get the relationship to the reference in views. Then you have access to the fields of the reference for viewing, sorting & filtering.

Drupal 8, view filter criteria with entity reference field not working

I have a field called event_author, which is a entity reference to user. The following it in view:
I have the event author field
I have all the results
After I add the filter, there is no result any more. It seems it is not entity reference not matching up with text 'author1'

Views Module: Display a key from user data (Drupal 7.x-3.11)

I'm having problems wit the User: Data field.
I want to set the Display format to A certain key to output the identifier value from this serialized data (relevant snippet):
a:1:{s:10:"hybridauth";a:26:{s:10:"identifier";s:17:"76561198181833179";
When I enter identifier as key, I only get this notice and no output:
Notice: Undefined index: identifier in
views_handler_field_serialized->render() (line 60 of
/www/htdocs/****/sites/all/modules/views/handlers/views_handler_field_serialized.inc).
What do I have to enter in the "Which key should be displayed"-field exactly, to display the identifier value?
Views Module: Display a certain key from the serialized user data (Drupal 7.x-3.11)
To achieve this you have to alter your view using hook_views_pre_view.
Steps:
Add a uid field and make it hidden in your view.
Add a custom or html field to your views(so that you can alter later).
In hook_views_pre_view and for the above view and above view display write your php logic to load the current user with the uid field in the view.
After loading the user use the data value of the loaded user and unserialize it and replace it with the custom or html field value.
Thanks

Texbox custom representation for Symfony2 entity form type?

My entity Person has a one to many relation with Tag entity. When creating a new person i'd like to show a textbox for assigning tag names separated by commas. User can then input an existent tag name or a new tag name (in this case, a new Tag entity is created and persisted).
Unfortunately entity field type has only checkbox and select representation. How can implement my own textbox representation?
You need to create a custom form type along with a custom data transformer.
This article is a pretty good guide on creating your own form type.
Also, check out Symfony's own source for the EntityType to get an idea of what's going on.
One way would be creating a custom data transformer.

Resources