2

I am trying to import entityform submissions. When using feeds and feeds entity processor it asks for a default value for the "date submitted". I have tried several date formats and none of them are accepted.

I have tried

m/d/y

mm/dd/yy

mm/dd/yyyy

month dd, year

unix timestamp

What format does this need to be in?

enter image description here

2 Answers 2

1

Dates have to be specified as timestamps. There is a patch for the Feeds entity processor module available to add support for date formats: https://www.drupal.org/node/2708243

With the patch applied, date formats can be the following (among more):

  • yyyy-mm-dd: 2017-06-30
  • yyyy-mm-ddThh:mm:ss: 2017-06-30T08:53:30
  • mm/dd/yyyy: 06/30/2017
  • mm-dd-yyyy: 06-30-2017
  • mm/dd/yyyy hh:mm:ss: 06/30/2017 08:53:30
  • dd-mm-yyyy: 30-06-2017
  • dd-mm-yyyy hh:mm:ss: 30-06-2017 08:53:30

The specified user should be an user ID, not an username.

1
  • Wow, thanks MegaChriz. That worked like a charm. You are awesome! Commented Jul 1, 2017 at 16:26
2
+100

Checking the code is seems the validation is done by entity module entity_property_verify_data_type which checks for numeric values regarding a date field. So try

yyyymmdd
20170627

not working

enter image description here

valid date

enter image description here

10
  • unfortunately that didn;t work, I get the following error: EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityDrupalWrapper->set() (line 736 of /sites/all/modules/entity/includes/entity.wrapper.inc). Commented Jun 27, 2017 at 15:56
  • I just tested this with the Node entity processor - EXPERIMENTAL version and it works as expected. So the must be some other problem on your system. I used the latest entity and feeds* modules. Commented Jun 28, 2017 at 5:39
  • Do you get a real exception? On what entity? I guess to have to be more specific with your question then. Commented Jun 28, 2017 at 5:41
  • 1
    Hi Nigel, I've created a patch to add better date support for Feeds entity processor. See drupal.org/node/2708243. See also drupal.org/node/2868044 for my answer on what to type in the "User" field for an entityform submission.
    – MegaChriz
    Commented Jul 1, 2017 at 10:58
  • 1
    The patch of MegaChriz would solve the user input which is great but will not solve the exception. I've retested using (DEV 2017-May-26) of FeedsEntityProcessorEntityform and still cannot reproduce. @NigelWaters I hope the patch works for you :). Could it be your modules are not all up to date? Commented Jul 1, 2017 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.