Closed (fixed)
Project:
Phone
Version:
master
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 May 2011 at 17:09 UTC
Updated:
21 Oct 2011 at 17:50 UTC
Jump to comment: Most recent file
Here's the initial port of this module to Drupal 7.
Previously the module introduced many field types, one for each country. My version now creates only a single field type "phone". The country setting is set globally per field instead and once the field contains some data, it cannot be changed.
I also tried to refactor a lot of repeating code into somehow leaner functions, especially various country-specific options.
What is missing (afaik):
- upgrade path from 6.x version.
- the tests were not tested yet :)
I'm posting both zipped module and a patch based on the latest HEAD version in repository.
| Comment | File | Size | Author |
|---|---|---|---|
| #33 | phone.tar_.gz | 33.6 KB | berenddeboer |
| #26 | phone.zip | 87.34 KB | cweagans |
| #10 | phone.zip | 86.91 KB | seandunaway |
| #9 | phone-7.x-1.x-1156850-2.patch | 330 bytes | seandunaway |
| #9 | phone.zip | 162 bytes | seandunaway |
Comments
Comment #1
BenK commentedSubscribing
Comment #2
jelenex commentedHere's the updated version:
- added the upgrade path (for use with content_migrate module in CCK)
- automated tests now work (although not all pass, but that's another issue--like this one: #1108066: Fix phone Simpletest)
- general file cleanup & renaming
I think this version is ready for testing, so please do test & review..
Comment #3
descender commentedSubscribing.
Comment #4
jerrac commentedNice, now, if only we could get a D7 dev branch going.
Which is to say, "Subscribing."
Comment #5
glottus commentedsubscribing
Comment #6
luigithekid commentedSubscribing
Comment #7
narky commentedYay! It's coming!
Comment #8
akalata commentedTesting #2. Receive following error when enabling the field on a content type:
Notice: Undefined index: country in phone_field_settings_form() (line 96 of /.../sites/all/modules/phone/phone.module).By default the field displays (and the area code / separator formatting options work well), but the display of this field seems to break the display of other fields, regardless of the order of display. Once I tweaked the Manage Display settings on the content type, the only available format was and I get this error:
Warning: Invalid argument supplied for foreach() in field_ui_formatter_options() (line 1451 of /.../modules/field_ui/field_ui.admin.inc).When adding the field to Views (new ui, 7.x-3.0-beta3), there are no Formatter options in the drop-down list, though the field does display correctly with the formatting defined in the field settings. (I have to resave the node after changing the display formatting, but I'm pretty sure that's just the way it works).
Comment #9
seandunaway commentedRe: #2 jelenex, for some reason I was unable to apply that patch to the master, or latest tag or latest branch. However, your included zip file worked great.
Re: #8 akalata, I think this patch fixes the issue. This patch applies to the module in #2.
I can reroll from master as soon as I can figure out how to apply jelenex's patch.
Please, please, please lets start a 7.x-1.x branch and get this in to simplify things.
Comment #10
seandunaway commentedWhoops, the whole module attached properly this time.
Comment #11
tommychrisphone.module at line 30:
which should be
Comment #12
akalata commented@rump, thanks, your updates fixed the formatter issue. Just got one error when adding a field:
Notice: Undefined index: country in phone_field_settings_form() (line 96 of /Users/Swan/Sites/ePC 2/sites/all/modules/phone/phone.module).Comment #13
Jerome F commentedsubscribing
Comment #14
rickmanelius commentedsubscribing
Comment #15
seandunaway commentedI have some more changes but am hoping for a 7.x branch with the latest offerings that will dramatically ease all of this. Can we get a commit or is this project dead?
Comment #16
unegro commented+1
Why the manteiner didn't release this as a dev version...
Please do this!
Comment #17
awolfey commentedHas anyone contacted Thierry? Maybe this could live in a sandbox for now.
Comment #18
unegro commentedRumber and Jelenex,
I contacted the maintainer of the project, I am awaiting response. I suggest that you contact as well, if he did not contact, I suggest you create a new project based on phone (CCK). This was done in migration of several projects d6 => d7
Comment #19
awolfey commentedIt would be best to maintain this one if it's really abandoned. Dealing with abandoned projects
Comment #20
jcarlson34 commentedGreat work on the initial port. It's working well for me so far.
Also, I agree with @awolfey, it'd be great if this project could be maintained.
Comment #21
jnettiksubscribing
Comment #22
seandunaway commentedComment #23
pauleb commented+1
Comment #24
JohnnyX commentedWill we get a first (dev?) release?
Some countries missing like Germany. But looks like a simple and good solution :)
Comment #25
cweagansI applied to be a comaintainer of this project in another issue and I also sent a message to the current maintainer via his contact form. We'll see how it goes.
Comment #26
cweagansI cleaned up the code a bit in the .module file.
It would probably be good to either a) rename the private functions to have an _ in front of them (instead of denoting that they are private functions with a comment) or b) rethink if they really need to be private or not.
Comment #27
seandunaway commentedBy my guess, there are now probably 5+ forks of this module floating around... I have made a lot of changes also.
Please, someone, anyone, take over this project, so we can get a 7.x :)
Comment #28
Jerome F commentedI tested the version provided by cweagans in #26.
There's a notice when you create the field, otherwise it works all right.
Notice : Undefined index: country in phone_field_settings_form() (line 93 in .../sites/all/modules/phone/phone.module).I tend to prefer the Phone number module in comparison, http://drupal.org/project/cck_phone
It's more flexible, because of its settings to choose which country codes to display in the select list. And you can use an extension if needed.
One thing no phone modules can handle now is the spacing between numbers, as described http://drupal.org/node/1133536 which apparently you can handle with masked input http://drupal.org/project/maskedinput but it is still not compatible with contributed fields such as Phone number, only with core fields. At least until this feature request is leading somewhere: http://drupal.org/node/1226706
IMHO the best is to merge efforts in Phone Number module and add the required formatters and perhaps provide a migration road if needed.
Comment #29
cweagansI'm having some other issues with my version - the phone field is not working when applied to a user. Haven't tried it with a node yet.
What appears to be happening is that include files are not being loaded correctly.
Another improvement that I'd like to make is to turn the country code includes into CTools plugins, so that any module can provide country code plugins for phone module.
Comment #30
Jarviss commentedsubscribe
Comment #31
jdleonard#26 appears to be working to me. Suffices for my purposes.
Comment #32
jdleonardActually, looks like the help text for the field (defined by admin in the Field UI) isn't being displayed properly, but that shouldn't hold up this branch.
Comment #33
berenddeboer commentedMinor improvement upon #26: fix of notice, added dependency on field.
Is this module still maintained?
Comment #34
khanz commentedAbove port #33 doesn't have all the countries so I chose "International Phone Numbers per E.123" as the option. But for invalid input its giving a confusing error...
where xyz is the input by the user.
Comment #35
sashken2 commentedberenddeboer, thanks! All works good for me. I'm use Russian phone number.
Comment #36
sashken2 commentedIt would be great if add a text field to phone number field.
For example:
+7 (343) 000-00-00 / / Support
+7 (343) 000-11-11 / / Advertising Service
as this module - http://drupal.org/project/double_field
Comment #37
cweagansChanging title for clarity in dashboard.
Comment #38
milos.kroulik commented+1
Comment #39
c4rl commentedSubscribey
Comment #40
barrapontoOwnership of the module is now being discussed at #1226088: Phone field/cck contrib has been abandoned in the Drupal.org Wembasters issue queue.
Meanwhile, a repository clone should be created with a branch for 7.x.
I'll get this done ASAP, and post a github link here, so we can work on the branch.
Comment #41
cweagansI guess I'm the new maintainer :) I'll try to work through some of the queue tonight.
Comment #42
jcarlson34 commentedAwesome news. Congrats cweagans!
Comment #43
seandunaway commentedThank you cweagans for rising to the occasion and for saving this project from death and destruction. :)
Comment #44
seandunaway commentedLeaving this open and setting to rtbc as a placeholder until this gets worked into the new dev branch.
Comment #45
cweagansAlright! Committed the latest version to Git and rolled a dev release. Should show up on the project page soon. Great work everyone :)
Comment #46
barrapontoComment #47
DanielF commentedHey, how's this coming along? I'm researching modules for storing phone numbers, and this seems to be the one everyone's excited about, but the
devtag is making me hesitant.Comment #48
cweagansI'd say use the dev version - it seems pretty stable for my uses, but I want to leave it as a dev release for a little while longer to give other users some time to open tickets against it before I roll a 1.0 release