Closed (fixed)
Project:
Contact
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2010 at 08:12 UTC
Updated:
11 Apr 2013 at 21:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
seeclark commentedI am having the same issue, using Drupal 6.19 + Panels 6.x-3.7 + Views 6.x-2.11.
I have a user profile page that includes a view with the "User: Link to contact page" field that passes the "UID from URL" as argument. This field shows the link for logged users, but only the empty text for anonymous.
I grabbed the Anonymous Contact module ( http://drupal.org/project/contact_anon ). With this module enabled, the contact link does NOT show up for anonymous, but anonymous CAN access the user contact page by typing in the url ( user/uid/contact ). Hmm!
The AC module seems to be doing its job, and from what I've read the lack of permission to access the personal contact page by anonymous is part of core by design.
Typically, my lack of PHP skill means I would just have to find another way of doing things, but I really want that link! It's honestly the last missing piece of functionality for my site. Would appreciate any help on this!
Comment #2
vodoleq commentedsubscribing
Comment #3
pumpkinkid commentedHeh... Nice, I just got the same problem... any ideas?
Comment #4
kesmeby commentedI'd give my right arm for a nice solution to this one.
For the time being I've got a crappy work-around. On your contact form settings check "Enable personal contact form by default" Then add an additional field to the user asking their permission to display a contact link wherever you plan to on the site.
In views get the UID and that new permission field in the view. Hide the UID from displaying (you just want its Replacement patterns). On the permission field check the "Output this field as a link" box give it the link path "user/[uid_1]/contact" and check the "Hide if empty" box. You may need to rewrite the output of the field and/or use a custom label to make the link say "contact" or whatever you like, depending on how you set up your user's permission field.
It's late and I haven't slept much for that last week so I hope that makes sense.
Comment #5
pumpkinkid commentedMine was, I created a custom module with some code that forces the contact form to be enabled when a user visits someones profile. Since it's the only place where my site has the contact me link, I just basically did the same thing you did but without asking the user for permission....
The modules just forces it on, and its enabled by the time anyone gets to the contact me link....
Still does not remove the link should I want to disable the contact forms...
Comment #6
tim.plunkettThis requires the patch at #1104404-1: Allow core replacement modules to implement hook_views_api.
Comment #7
tim.plunkett#1104404: Allow core replacement modules to implement hook_views_api went in.
Comment #8
dave reidSweet. Committed to Git.
http://drupalcode.org/project/contact.git/commit/2d48134
Comment #9
dave reidI've asked Tim to test using Views 3.x to make sure this works there as well, so I'm going to leave this as 'active' until it can be confirmed.
Comment #10
tim.plunkettWhoops, lost track. Will do this soon.
Comment #11
roam2345 commentedTracking this not working in D7 dev..
Comment #12
pjbarry21 commentedHaving the same problem in D7 dev -- using Views 7.x-3.0-beta3.
Comment #13
gpk commentedThis has only been committed to (#8) to 6.x, perhaps someone can confirm (#9) it works OK with Views 6.x-3.x and then it looks like Dave will also commit to 7.x.
Comment #14
tim.plunkettThis works just fine with Views 6.x-3.x, and is made obsolete by #1021590: Contact Link isn't showing in View for Views 7.x-3.x.
Comment #16
BrianLewisDesign commentedOr just rewrite the [iud] field in views (and don't forget permissions):
relationship - Content:Author
field - Content: Author uid
- REWRITE RESULTS - Rewrite the output of this field [X]
<a href="?q=user/[iud]/contact">Send Email</a>Comment #17
gpk commentedRevert Title. Looks like the workaround #16 would only be needed if running older versions of Views or this module.
Comment #18
paulo.faria commentedProbably you didn't fill the field "Text to display". Check it ;)
Comment #19
cfischer50 commentedThanks for posting, pcf! That was my problem. DUH!