Closed (outdated)
Project:
Telephone (From Core)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2013 at 16:05 UTC
Updated:
16 Jun 2026 at 18:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
vlooivlerke commentedHi I tried to use some code from the phone module
the file: telephone.feeds.inc
But Feeds is not seeing my new include file, tried clearing the cache but did not bring it up in the feed mappers targets
Comment #2
vlooivlerke commentedHi
This above patch works if you uninstall feeds module and then reinstaal feeds.
Telephone will be available under the mappers.
Comment #3
damienmckenna@vlooivlerke: Did you try clearing the site caches rather than uninstalling the module?
Comment #4
vlooivlerke commentedHi I did clear the site cache more than once.
It seems that clearing the cache does not make the new feed.ini page availableto feeds. Only uninstaaland/reinstall makes feed aware on the .inc file in my case. It is anointing.
But at least the telephone feed is now working
Comment #5
adiatisI can confirm that #1 is perfect solution.
Add "files[] = telephone.feeds.inc" to telephone.info
After clearing the cache, the telephone field is available.
Will this be added to the module for future updates?
Comment #6
vlooivlerke commentedHi
I was thinking to use
Add "files[] = telephone.feeds.inc" to telephone.info
but inspecting other feed modules I noticed that it did not contain a string like that in the .info file.
Thanks, now I learned something too
Comment #7
damienmckennaThat info file change wasn't needed when we added Feeds integration to Metatag.
The Feeds module keeps several records in the primary cache table, all that should be necessary is to do a full cache clear.
Comment #8
fullerja commentedI rolled a patch with the fix in #1, which worked perfectly for me. I did a registry_rebuild and the importer came right up.
Comment #9
petterw03 commentedPatch in #8 works like a charm for me. Thanks!
Comment #10
tyler.frankenstein commented#8 works for me. FWIW, I see an
'und'hard coded in, which may cause issues for multi lingual sites.Comment #11
tyler.frankenstein commentedI jumped the gun on this one a little bit, the patch in #8 works only for creating a new user.
The telephone field value is properly set when creating a new user account, but if the Feed is set to update existing users, the telephone field's value will not be updated properly.
For example, creating a user via a CSV file works fine:
demo,demo@demo.com,1234567890But when updating that same user via a new CSV file later, the new phone number is not saved:
demo,demo@demo.com,4567890123Feeds reports that
"There are no new users.".Is there a hook(s) that can be added to the patch to indicate a telephone number is being updated? I've posted a fairly detailed description about this question here, and am looking to contribute to this issue's resolution: http://drupal.stackexchange.com/questions/135269/how-does-feeds-decide-i...
Comment #12
tyler.frankenstein commentedAfter further testing, the patch in #8 works fine for existing users if they did not have a telephone value. But if an existing user does have a telephone value, then the value does not get updated during the import (even if "update existing users" is set).
Comment #13
fullerja commentedCleaned up the patch a little bit including the 'und' mentioned in #10. Checked updating and it works for me, make sure that you have a unique field defined in your importer.
I also read on StackExchange that the issue mentioned in #11/#12 with importing for users was resolved.
Comment #14
genjohnson commentedThe patch in #13 looks okay to me.
I created a Node importer and successfully updated a Telephone field on existing nodes and created new nodes with phone numbers.
Comment #15
fullerja commentedI also tested this with a telephone field on a users, using profile2 and feeds_profile2. Creation and updating works for me.
Comment #16
Cale Bierman commentedThe patch in #13 worked for me.
I created a Node importer and created new nodes with Telephone numbers. I also updated Telephone field values on existing nodes.
Comment #17
genjohnson commentedI just tested patch #13 with a telephone field on users. Using profile2 I added a telephone field to user entities. I used feeds_profile2 along with feeds to create the importer. I used the user name as a unique identifier and made sure that "update existing users" was selected.
Here is a screenshot of my mapping for the user processor:

And here is a screenshot of my settings for the user processor:

.csv files aren't allowed to be uploaded, so I've attached a .xsl version of the .csv I imported.
With this configuration I was able to update the phone number of user demo1 and successfully created user demo2.
Based on this I'm marking as RTBC.
Comment #18
fullerja commentedComment #19
kevinsiji commentedImported data into fields collection. Works great.
Comment #20
brandy.brown commentedWhen I run the import from a file, it succeeds, but when I try to run the import using http fetcher, it throws
Notice: Undefined variable: field in telephone_feeds_set_target() (line 54 of /srv/bindings/e224733cdb3f43a0a1f61413eee21e21/code/sites/all/modules/telephone/telephone.feeds.inc).
Comment #21
densolis commentedI used patch # 13 to import telephones numbers into a content type / node and it worked fine. I did not check to see if it would update an existing field.
Comment #22
gabriel.achille commentedpatch #13 works for me for both new field and updated field.
Comment #23
tko commented@gabriel.achille Does it work with multi-valued fields for you? Mine does not.
Comment #24
tko commentedHave no time to roll a patch but have corrected #13 to work with multi-valued telephone fields. Replace _feeds_set_target from #13 with the following:
Comment #25
gabriel.achille commentedI am using a single-valued field, I don't know for multiple-valued field. But i can try your updated patch on my case and see if there is no regression.
Comment #26
osmanI believe the last line should have been:
Comment #27
osmanHere is an updated patch.
I tested with single and multiple field values.
Comment #28
Anonymous (not verified) commentedWorks for me.
Comment #29
Joni Haeck commentedI can verify #27 works.
Comment #30
galeaspablo commented#27 tested in production, works for me
Comment #31
gauladell commented#27 also worked for me, Thank you.
Comment #32
jaspher commented#27 Works here too.. RTBC?
Comment #33
peterbrazier commented#27 Worked for me but telephone.feeds.inc file was placed into the Drupal root rather than sites/all/modules/telephone
Comment #34
santanudas commented#13, #27 worked for me. Thanks for support.
Comment #35
lpalgarvio commentedis a commit and publish scheduled soon?
Comment #36
mellowtothemax commentedHello,Osman how did you import multiple field values?regards,Update: Never mind. Tamper feeds worked for me.
Comment #37
cdmo commented#27 worked for me, sounds like this is RTBC
Comment #38
brayfe commentedConfirmed #27 worked for me too. Was able to add a field in the importer and successfully import a telephone number. I think it's ready to roll in!
Comment #39
biigniick commented#27 worked for me after uninstall and reinstall of feeds module.
Comment #40
WorldFallz commentedI can also confirm #27 works as advertised. It would be good to get this rolled into the dev snapshot at least. I'm happy to co-maintain if that will help move things along.
Comment #41
megachrizFor other modules to easier override the target, consider to use the hook
hook_feeds_processor_targets()instead (available since Feeds 7.x-2.0-beta1). See https://www.drupal.org/node/2638830.To support multilinguality, the field should respect the mapping option "language": https://www.drupal.org/node/2638802. This mapping option is available since Feeds 7.x-2.0-beta2.
Comment #42
osmanThanks for the suggestions @MegaChriz.
I re-rolled the patch with the suggestions.
Comment #43
joelstein commentedWorks for me, thanks!
Comment #44
zlinedavid89 commented#42 worked like a charm. Thanks!
Comment #45
bbc#42 worked for me as well. Thanks much!
Comment #46
matthieu_collet commented#42 not working for me :(
i uninstalled / reinstalled feeds 3 times
clear cache
...
still not working
I use it with CRM Core entities, perhaps it's the reason ?
Comment #47
matthieu_collet commentedit was related to another issue with CRM core and feeds, problem is fixed now
https://www.drupal.org/node/2549793#comment-11201041
Comment #48
thirdender commented#42 worked for me as well.
Comment #49
rsomaskandan commented#42 worked fine for me.
Comment #50
kumkum29 commentedHello,
shortly, have you planned to add the patch #42 in the next version on this module?
Comment #51
yazzbe commented#42 works for me.
feeds 7.x-2.0-beta2
telephone 7.x-1.0-alpha1
Comment #52
anairamzapHey, just a quick note to say #42 is working for me on Telehpone 7.x-1.0-alpha1 and feeds 7.x-2.0-beta2. Thanks osman :)
Comment #53
kbrinner#42 worked for me with Telephone 7.x-1.0-alpha1 and Feeds 7.x-2.0-beta2 as well. Did not need to uninstall/reinstall Feeds, only had to clear cache.
Comment #54
marcxy commented"#42 worked for me with Telephone 7.x-1.0-alpha1 and Feeds 7.x-2.0-beta2"
I confirm as well.
Comment #55
erindarri commentedWanted to give some more feedback about telephone feeds. I have three telephone fields (main, fax, toll-free) that could be filled in for a content type. I was using phone module and only getting a single phone number entry out of 200. I assumed it was the module and switched to this one. (I added the patch #42 before trying any feeds, so I can't comment on if the patch helps or not.)
But even with telephone, I was having the same issue--only one entry was getting the data. It turned out that it was the only one that had all three telephone fields filled in. In order to get any of the numbers filled, I had to add numbers for all three fields.
I tried to add only one of the fields in the feed at a time.
I tried to add dummy data and then reimport again trying to clear it out.
I ended up adding dummy data and then removing with VBO, but it was a very strange experience that I wanted to add to the pool of knowledge.
Comment #56
anybodyRTBC #42. Could you please add it to dev and create a new alpha or beta release?
Comment #57
damienmckennaI think the module could use a new comaintainer..
Comment #58
fool2 commented#42 works with SQL import. Previously nothing would happen- field would show up in interface and import preview would show a value but no values would be imported into the field/database.
Comment #59
fool2 commentedSo #55 is definitely an issue, I have confirmed it with patch #42. I will investigate further. I think the last field in the bundle (or in the import, not sure) is not being populated no matter what-- so when there is only one field populated, it is the last field so it is skipped.
Comment #60
gisleNumber #55 needs to be reviewed before proceeding.
Comment #61
gisleSigning up for this one.
Comment #62
anybodyThank you gisle, according to #59 I'd suggest do rewrite the foreach to
and remove the manual count. Perhaps that may solve one of the problems.
Comment #63
gisleThe patch in #42 works, but only for nodes (not users).
Based upon extensive testing, I do not think it is not possible to make it work correctly for users if there are more than one telephone field in the user profile (see report in #55).
I've created a child issue (#2998265: Feeds Import Integration for the user entity) to solve this specific use case.
However, I believe that the vast majority of use cases only involve feeding into nodes, or into user entities with a single telephone field. So to move this issue forward, I've rerolled the patch in #42 to give a meaningful error message if the use case is not supported. I have not changed anything else. This is intended as an intermediary solution, until the child issue is also resolved.
I've also uploaded a file "
test_csv.txt" (rename to "test.csv") for those who want to test feed imports with multiple telephone fields.Please review.
Comment #64
dbiscalchin commentedI've tested the patch #63 with a custom entity type using feeds_entity_processor module. It worked perfectly! Thank you!
Comment #65
gisleIf you need to import telephone numbers into the user entity (as opposed to nodes), you may want to implement
hook_field_user_import_supported_alterand use User Import to import the fields.For an example of this hook for phone fields, check out the Phone Field. This project already has this hook implemented.
Comment #66
FireHawkX commentedJust applied patch #63 to latest version and it worked perfectly for me.
Telephone showed up in the import feeds and the import worked too. :)
Comment #67
smustgrave commentedTelephone is moving from core so closing old D7 tickets