Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Not recognized the date fields for import a user from a csv file.
Field is not supported.
You may find this (currently unanswered) question on Drupal SE of some relevance.
Comment | File | Size | Author |
---|---|---|---|
#6 | user_import-field_date_is_not_supported-2149721-6.patch | 4.42 KB | gisle |
Comments
Comment #1
xurizaemonNot a fix for User Import, but it may help you to know that Feeds module imports date fields fine out of the box.
Comment #2
jeremymears CreditAttribution: jeremymears commentedHaving the same issue, trying to import join and expiry dates for social group from a membership csv.
You mention using Feeds, how would I use it to do this?
Would be nice to mention it in Docs of User Import that it doesn't support date fields
Comment #3
gisleSigning up for this.
Comment #4
gisleHere is a patch that implements the
date
field (i.e. "Date (ISO format)") provided by the Date project. It contains a plugin file ("date.inc") that should be placed in the "supported" sub-directory.Please review.
To be honest, I am not sure if I've got this one 100 % right. I've verified that it works, but the solution is not as "clean" as I would like.
The only way I've found to make the project aware of the
date
field being supported was to uncomment that field infield.inc
and not implementhook_user_import_form_field_match()
. I would have preferred a solution wheredate.inc
was self-contained andfield.inc
untouched, but this is as far as I got.If there is anyone with more insight in these things than me that can improve this patch, please step forward!
For the record: This does not implement the two alternative date fileds (
datetime
anddatestamp
) that is also provided by the Date project. Also, it only implements a single date the Date project allow for a second date field to hold an end date. All those frilld will be added to the plugin after this patch one becomes RTBC. But for review purposes, i wanted this patch to be as basic and short as possible.Comment #5
gisleChanging status.
Comment #6
gisleRerolled patch against latest 7.x-3.x-dev snapshot.
Comment #7
gisleFixed in the last development snapshot the 7.x-3.x branch.
Comment #8
gisleSetting back to "Needs work" as patch in #4 is not the right solution - rolling back.
The Date module should support
field_date
.There is a patch in #3083277: Implement hook_field_user_import_supported_alter.
Comment #9
gisleClosing, as this should be implemented in the Date module by applying the patch posted in #3083277: Implement hook_field_user_import_supported_alter.