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

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.

| improve this answer | |
  • Wow, thanks MegaChriz. That worked like a charm. You are awesome! – Nigel Waters Jul 1 '17 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

| improve this answer | |
  • 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). – Nigel Waters Jun 27 '17 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. – Clemens Tolboom Jun 28 '17 at 5:39
  • Do you get a real exception? On what entity? I guess to have to be more specific with your question then. – Clemens Tolboom Jun 28 '17 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 Jul 1 '17 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? – Clemens Tolboom Jul 1 '17 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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