Personal Contact Forms: Access Denied for Anonymous Users

Grinin - February 10, 2007 - 08:42

First things first, I have searched the forums once already and found 2 posts dealing with this topic, however neither of them were answered. This being said, I decided to start a new thread to see if I could get a response.

My client (www.BHNBC.com) needs a directory listing of their employees. I created user accounts for each of the employees who will have their own "personal contact form". (Currently only JMBrydon, Valerie Dauphin, and Herbert Spahn have personal contact forms) Anyhow, when an anonymous users clicks on their name on the block which is linked to their personal contact form... It brings them to an error page which reads "Access denied"

The whole point of these forms, is so anonymous surfers who navigate to their site can contact them, without exposing their email addresses to spam robots.

I checked the access control permissions and anonymous users are allowed to use "site-wide" contact forms, as well as view user profiles. However the problem persists.

I will take all the help I can get on this problem, and I am very grateful for the great community of developers that drupal has.

Thanks, and I look forward to your replies.

Grinin

Lkely answer

agentrickard - February 10, 2007 - 13:12

This answer assumes you are using Drupal 5 and acting as User 1.

After you enable the Contact modules and adjust the Access Control, you have one more step.

By default, Personal Contact Forms are disabled -- but if you're acting as User #1, the site SuperAdmin, you have access to all features. That means you can see the forms, but no one else can.

The staff accounts that need contact forms need to enable those forms, under user/#/edit.

This is one reason why you shouldn't do site admin as user #1, it can throw you off because user 1 has complete access to everything, despite what Access Control rules are. See http://drupal.org/node/22284, Best Practices Guide.

The same is true for Drupal 4.7, I'm fairly certain.

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

Thats what I did first.

Grinin - February 12, 2007 - 05:04

I understand as super-admin, I have access to everything, but I went user by user as I created them and checked the box that reads "personal contact form" on all the users that require it.

This being said, I don't understand why it does not work? Anonymous users have the permissions to use site wide contact forms, and I even gave them permission to access user profiles, in-case the personal contact forms inherited the permissions of "profiles"

I'm as lost as ever on this, because it seems like some pretty basic functionality.

I.T. Consultant by day... Drupal developer all the time.
http://chrisllorca.com

bug?

agentrickard - February 12, 2007 - 15:52

Could be a bug? What Drupal version are you running?

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

On my

Chad_Dupuis - February 10, 2007 - 14:14

On my http://www.yinyanghouse.com/ site I have allowed anonymous users to contact both sitewide and via individual contact forms. To do this I had to add some hacks to the contact module, and perhaps others, but it was all code I found in posts regarding this topic - oh, and I am running 4.7.

After the code changes, however, I found that I still had the issue that you describe in certain cases. What I found is this -- after a user has created an account (or the admin created it manually) no anonymous users can view their profile until the user had actually logged in and out one time. As I was testing this with accounts during the developmental stage, nobody had logged in except for the admin and one other account so it was confusing to track this down. I found that if I went into the database and set the time variables related to when a user logged in, etc. to anything but 0, then every profile was viewable and the contact forms worked as expected.

Hacking core

agentrickard - February 10, 2007 - 22:27

So what am I supposed to do?

Grinin - February 13, 2007 - 17:55

Right now I have an upset client, who just wants his users to be able to go to their web site, click on their names and send them an email, without having to public their email addresses blah@blah.com so spammers can pick them up.

It seems like this is something that can be so easily fixed, but it should be something that works right out of the box for such a robust CMS as drupal is. I mean, it can do everything else, but anonymous users can't email site members?? That just doesn't seem right.

Should I report this as an official bug, or what? Because this seems to be some pretty standard site activity, that simply doesn't work.

Thanks,
Chris

I.T. Consultant by day... Drupal developer all the time.
http://chrisllorca.com

After a user logs in the

VeryMisunderstood - February 13, 2007 - 18:10

After a user logs in for the first time, the profile and contact form should become active (and stay that way). log in as one of the users whos profile is inactive. Then logout, and test as anon user for this contact form.

I tried this suggestion when

Grinin - February 19, 2007 - 03:09

I tried this suggestion when I posted this as a bug in Drupal 5.1 and it still did not work.

I logged in as each individual user, and was unable to access the personal contact form as an anonymous user.

Any help would be great.

Is there any way to escalate my bug?

I.T. Consultant by day... Drupal developer all the time.
http://chrisllorca.com

I am having the same issue.

greeneo - March 8, 2007 - 17:09

I am having the same issue. Anonymous visitors must be able to use contact forms.

Me too

jsurcombe - March 9, 2007 - 16:46

Sorry, me too - I'd love to be able to give anonymous visitors the ability to contact article editors just by clicking on the author's name and writing their feedback, but it doesn't seem to be possible.

Discussion

agentrickard - March 9, 2007 - 16:58

Discussion of the design logic is here: http://drupal.org/node/118708

Work on patches / solutions are here: http://drupal.org/node/58224

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

Same here... gues what...

maikr - March 15, 2007 - 21:38

Same thing happens overhere. Also with the Authenticated user type.

Side Wide Contact Form is enabled.
The option to default allow other users to contact the new user is also enabled.
Authenticated users have access to User Profiles.

No Personal Contact Form appears.

Then I thought, what;s the difference between this role and a Forum Admin role I did set up?
Well, the option to also maintain/edit user profiles.

So for testing I did enable it on the Authenticated User role... guess what?
The Personal Contact Form became active!

Could it be an if/then clause attached to the wrong option???

One other thing... users can only send a message to themselfs (?).
Sender (ofcourse) and recepient are the same and are not editable.

Best regards,
Maik

Available for 5.1

mrtoner - May 19, 2007 - 22:16

Grinin, your request has been heard: http://drupal.org/node/58224

privatemsg

wpoehner - June 5, 2007 - 04:19

This could be a temporary fix.

http://drupal.org/project/privatemsg

Never mind...

I want Sitewide contact form , but

neel - July 4, 2007 - 08:10

hello ,
I want to add sitewide contact form in contact page, but I dont want user's persional contact form. how to do this?

I am using private massage module for user's intraction. so I dont need persional contact form. how to do this?

 
 

Drupal is a registered trademark of Dries Buytaert.