Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Any phone field (http://drupal.org/project/phone) does not show up in the mapper.
Comment | File | Size | Author |
---|
Comments
Comment #1
johnbarclay CreditAttribution: johnbarclay commentedThis is a duplicate of #959106: Feeds mapper for phone CCK fields, which was for 6.x.
Mapper support in feeds is only for drupal core fields. This request should be in the phone module. Perhaps a second feature request for 7.x mapper is in order also.
Here is a list of mappers and mapper requests: [#856780]
Comment #2
berenddeboer CreditAttribution: berenddeboer commentedHere's the patch.
Comment #3
Ben Coleman CreditAttribution: Ben Coleman commentedApplied this here, and it seems to work fine. The field shows up in the mapper, and appears to import correctly.
Comment #4
kthull#2 worked great...thanks!
Comment #5
berdyshev CreditAttribution: berdyshev commentedDev version of the feeds 2.x module allows to simply add MODULE_NAME.feeds.inc file in the root of the module folder and it will load it automatically.
So I have refactored the patch from comment #2 to use this feature. Please review it.
Comment #6
jeffschulerPatch in #5 works for me.
Thanks!
Comment #7
TimelessDomain CreditAttribution: TimelessDomain commentedi can confirm that #5 works. thanks!
Comment #8
joshmillerPatch applied and feeds brought in data.
My only complaint is to do with the fact that the phone field requires a default country. If I'm importing mexican, candadian, and US phone numbers, two of the three will fail validation. Sad, but fixable.
Josh
Comment #9
star-szrThe patch in #5 works, I'm not sure why the @file refers to link.module though.
Comment #10
deggertsen CreditAttribution: deggertsen commented#5 works for me as well. I had to save the file, name it as "phone.inc" and put it in modules/feeds/mappers before it would work. I am reassigning it to the feeds project, as it would need to be applied there I believe. If I'm wrong, please switch it back to "Phone".
Thanks!
Comment #11
star-szr@deggertsen - You'll need to use 7.x-2.x-dev of the Feeds module for now.
Comment #12
MrPeanut CreditAttribution: MrPeanut commentedJust confirming that #5 works for me as well.
Comment #13
JSCSJSCS CreditAttribution: JSCSJSCS commentedIt worked for me too, but there is one little side effect. When using Views, and adding fields to a view, there are now TWO phone fields to choose from:
Content: Phone Number
Appears in: node:dealers.
Content: Phone Number (field_dealer_phone_number:delta)
Delta - Appears in: node:dealers.
I had to pick the first one to get anything to show.
Comment #14
jeffschulerJSCSJSCS: That's not from this patch. Multiple-value fields provide that to views so you have access to the index of the value within the field.
Comment #15
Rob_Feature CreditAttribution: Rob_Feature commentedYeah, confirmed that #5 works. Let's get this baby committed!
Comment #16
TimelessDomain CreditAttribution: TimelessDomain commentedYou can add the following code to make sure that empty values are not imported. More info here #1107522: Framework for expected behavior when importing empty/blank values + text field fix
Comment #17
cweagansCopy/paste error?
Why is this implementing hook_feeds_processor_targets_alter() instead of just hook_feeds_processor_targets()? If there's a reason for it, can we add a comment about it? If not, let's change it so that other modules can alter phone's feed processor targets without having to mess with the module weights.
Comment #18
dddbbb CreditAttribution: dddbbb commented#5 worked fine for me. Thanks!
Comment #19
barraponto CreditAttribution: barraponto commentedImplemented the check mentioned in #16 and gave the file a proper description, as mentioned by @cweagans. However, as for the second issue @cweagans mentions, I found no mention of
phone_feeds_processor_targets()
in feeds.api.php. Thus, I left it implemented asphone_feeds_processor_targets_alter()
Comment #20
star-szrIndeed, hook_feeds_processor_targets_alter() is the hook to use. If other modules need to change the Phone module's Feeds processor targets, couldn't they just implement hook_module_implements_alter()?
Patch looks good to me now that the @file comment has been fixed up.
Comment #21
cweagansUgh, I hate it when modules have alter hooks without info hooks. That's just poor design. I'm okay with this patch, then. I'll leave this as RTBC and let rfsbsb commit it.
Comment #22
rfsbsbCommitted to 7.x-1.x
Comment #24
tgeller CreditAttribution: tgeller commentedI still can't get it to show up in my Feeds mappers. I'm running:
I downloaded #19 and applied the patch. I then tried:
But when I go to edit the Feed Mapper, I don't see my phone field in the popup menu. What am I missing?
Comment #25
tgeller CreditAttribution: tgeller commentedUh-oh. I have cck_phone installed, not phone.
*headdesk*
Comment #26
alex.skrypnykCode in #16 and commit in #19 contains error:
Replace
with
How did it get committed if the feeds import does not work?
Comment #27
alex.skrypnykRe-rolled patch for #19 attached
Comment #28
milos.kroulik CreditAttribution: milos.kroulik commentedPatch at #27 doesn't apply anymore for Phone 7.x-1.0-beta1.
Comment #29
joelpittet#26 seems to be right, here's the patch.
Comment #30
szy CreditAttribution: szy commentedThere is still the error with the latest patch:
"Notice: Undefined variable: field w phone_feeds_set_target() (linia 58 z /var/www/my.drup.al/modules/phone/phone.feeds.inc)."
But the phone numbers were imported successfully - with Phone 7.x-1.0-beta1.
Szy.
Comment #31
joelpittet$field may need to be set as an empty array() or NULL to initialize it @szy? That or we ignore it if it's not isset()?
Also 'und' should really be the constant LANGUAGE_NONE.
Comment #32
joelpittetI guess my patch above was for beta1.
Comment #33
joelpittetAnd I'm crazy it applies to both.