For some reason, the phone field does not show up in Views that are tables or lists, but it does show up in other views.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | phonecck.png | 2.03 KB | tknospdr |
| #4 | phone_1.patch | 1.31 KB | Tresler |
| #2 | patch_92.txt | 14.53 KB | specialtouch |
Comments
Comment #1
coupet commentedconfirmed, having same issue
Comment #2
specialtouch commentedThis latest patch fixes problem. Only works with Drupal 5.
Comment #3
Tresler commentedpatch_92.txt appears to also completely remove French Phone Number functionality. Just FYI
Comment #4
Tresler commentedAttached is a patch that resolves this issue for 4.7
Replaced hook_field custom function with content_format().
Formatting is still done before database entry - this just makes it play nice with Views.
Comment #5
thierry_gd commentedJust applied some changes. cf. new 4.7 release
Comment #6
mshaver commentedI'm not getting this to work still? I actually solved the problem before the patch by creating a phptemplate_views_handle_field entry in my template.php file. For some reason this worked? With the patch, now neither works?
Any ideas?
Comment #7
Tresler commentedHey Thierry,
Just getting a chance to look at this. I'll download and test, but just looking at the code, it looks like you're still going around the flow that cck uses.
the content_format() function passes the default formatter to hook_field_formatter. By calling phone_field _formatter() from inside phone_field, you're eliminating the need for this.
I guess a better way to put it is this:
content.module will imvoke hook_field and hook_field_formatter itself. By calling phone_field_formatter in your module you are circumventing the work that content.module should be doing. That, and unles I'm mistaken, phone_field_formatter will now be called respeatedly - once by you and once by content.module.
Testing, and will report back.
Comment #8
Tresler commentedOk, here's the story, this works, but... The formatter system was set up so that if someone wanted to write a different formatter to extend this, they would just need to write a new module - without altering yours (much more applicable to core than contrib, but still, better to not have to alter a module if you can extend it elsewhere.
So if I wanted to, say, format all phone numbers to have a pretty picture beside them, I could create a module called phone-pretty-picture, and all I would need to call inside that module would be a new hook_field_formatter() and hook_field_formatter_info
By, bypassing the content_format() function, content.module doesn't get to give other modules a chance to throw in new formatters.
Comment #9
mshaver commentedThis is still not working! I don't understand why these particular views (table & list) aren't displaying the values? Any help would be appreciated.
Thanks!
Comment #10
Tresler commentedmshaver - yeah - thats what "patch (code needs review)" means. We're working on it.
If you are so inclined to help, download the module, apply the patch and tell us if it works for you. That would be the "review" we are looking for.
I refer you to http://drupal.org/node/28245 for information on applying a patch to a version of drupal. Please note that the patch I submitted is against 4.7 - not head.
Thanks!
Comment #11
mshaver commentedSorry, my follow-up message wasn't clear that it was against your patch and it doesn't seem to work on my installation. I've tried to modify the code to make it show up without luck. I'm stuck at this point.
Has anyone tried the patch against Drupal 5?
Comment #12
Tresler commentedI don't think the patch will work against 5.0, although I'm not sure.
The patch I submitted you need to be sure to clear your cache even if you don't have caching enabled (don't ask me why, I don't know, but thats what I had to do).
If that doesn't work, post back and I'll look at it again.
Comment #13
mshaver commentedYes, your patch does work! Thanks for your work. One confusion was the versions seem screwed up, as your patch was against 1.2 right and current 4.7 version is 1.1.5 I believe. Anyway, I'm using the 1.2 version with your patch and it's working. Multiple values stil seems like it's not working though.
Comment #14
Tresler commentedMultiple Values Issue
http://drupal.org/node/91068
Comment #15
Tresler commentedHi Thierry,
I've sent two messages to your ontact page, but in the event it isn't working:
I have a decent interest in seeing this and zipcode.module patches that I submitted - committed as I am running them on production sites. I TOTALLY understand if you're busy. Would you be interested in giving me co-maintainership, or passing these along to me?
Just to be clear, I'm not criticizing, just offering my help. Thanks for all your hard work!
--Sam Tresler
Comment #16
tknospdr commentedI'm getting this:
My guess is it's because you can't choose any value except hidden when you try to insert it into a view. I tried the patch and it didn't work. As a matter of fact I don't think I was getting those errors above until after I tried your new version and it's patch.
See attached screenshot to see what I was taking about RE hidden.
Comment #17
thierry_gd commentedCorrections done in drupal 5 version
Comment #18
tknospdr commentedI was using the new version. And I just updated to your latest dev version dated this morning and I'm still getting the same issue. I can only choose hidden in the Display Fields section of my defined content types.
Any help appreciated.
Thanks,
David
http://www.FloridaPets.org
Comment #19
thierry_gd commentedupdates done
Comment #20
(not verified) commented