If I try to map to an integer field, the following error is thrown:
Recoverable fatal error: Argument 5 passed to number_feeds_set_target() must be of the type array, boolean given.

Patch will follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dready2011 created an issue. See original summary.

dready2011’s picture

rosemaryreilman’s picture

Had similar issue not only with integer but also with date and text fields mapping. Applied same patch. Seems to have fixed the issue for me and allow import.

RonanLK’s picture

dready2011’s patch fixed the fatal error for me, but integer fields were not imported.

Here is another patch that sends 'und' as the language.

Pierrere’s picture

I can confirm this bug. Importing xls files was functional before and now stopped working.

The patch in #4 by ronan.leroy works and produces clean data on import.

PascalAnimateur’s picture

It seems feeds_xls changes the callback for all targets, even on feeds not using the XLS parser.

This is caused by the feeds_xls_feeds_processor_targets_alter function ... this breaks other importers!!

PascalAnimateur’s picture

The callback signature for *_feeds_set_target_* has changed in feeds 7.x-2.x-dev to include a mapping argument... see number_feeds_set_target for an example.

Here's a patch to fix that in feeds_xls. .. but still the processor target altering should not affect importers not using feeds_xls!

tijsdeboeck’s picture

Thanks for patch #7, it works perfectly!

rosemaryreilman’s picture

Thanks for #7.

maxplus’s picture

Thanks,

#7 worked for me!

Pol’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, #7 worked for me too.

dks786’s picture

number_feeds_set_target($source, $entity, $target, $value, array());
It removed my error,

But not importing feed (xls) value to my drupal field(checkbox field)

shi99’s picture

Patch in #7 worked for me,
My boolean checkbox correctly gets the value set.

Thanks

mackpipe1’s picture

Excellent patch solution # 7, I only need a single error to correct, and it is the loading of data type Date, since it fails to load when there is a field of type date., Someone could help me to know That it lacks this process to be totally perfect

zterry95’s picture

confirm #7 patch works for me.

cmseasy’s picture

Usefull feature, using patch #5 on a production site for more then a year with success.
Please commit.

skylord’s picture

Priority: Normal » Major

Seems major as actually module is unusable without it on latest Feeds with different hook_feeds_set_target_* signature.

junaidpv’s picture

#7 worked

DamienMcKenna’s picture

I recommend using #2651420: Remove processors for list, numeric fields, which removes feeds_xls_feeds_set_target_list_text() and feeds_xls_feeds_set_target_numeric(), leaving only one function to fix.

DamienMcKenna’s picture

Title: Mapping for numeric field not working » API change on *_feeds_set_target() callbacks

Changing the issue title to make it more clear what the issue is.