Quantcast
Channel: Active questions tagged users - Drupal Answers
Viewing all articles
Browse latest Browse all 596

How to import multi-value fields into profile2 using the Migrate module

$
0
0

I have users each with a profile using the profile2 module. I am using a cookbook based on the Migrate framework to create the users and import profile data.

Sample CSV data would be:

"member_nr","email","username","tel_1""1001","new.tester@example.com","new tester","00000 12345-213"

But one of the profile fields is a text list using the checkboxes / radio buttons widget. According to the GUI, the values are stored in the format key|label.

So the field has values:

soccer|soccerweight lifting|weight liftingboxing|boxingtennis|tenniscooking|cooking

So I am trying to import data similar to:

"member_nr","email","username","tel_1", "interests""1001","new.tester@example.com","new tester","00000 12345-213", "soccer, weight lifting, boxing, tennis, cooking"

However, when running the import, I get an error that says:

SQLSTATE[22001]:String data, right truncated: 1406 data too long for column field_interests' at row 1: INSERT INTO... [the data from the CSV file]

How should multi values be formatted in the CSV file to be accepted?


Viewing all articles
Browse latest Browse all 596

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>