Hi, I've gotten Drupal installed and mostly configured. I've enabled the contact module, and the personal contact forms for certain users, and put up a contact us menu, and they worked for a while (the forms) but now, they seem to be broken. I get an access denied error whenever I try to access any contact form directly, or through an alias. You can view the page in question at http://uwomtb.com/uwomtb and click on either of the links under "Contact Us" or you can access the forms directly at http://uwomtb.com/uwomtb/user/1/contact and at http://uwomtb.com/uwomtb/user/2/contact but all you will probably see is access denied. I can't even view them as admin. If anyone knows what causes this problem, I would appreciate the help. Otherwise, if I can just edit something directly in the database that would work to. Thanks for any help that anyone can provide!

Comments

Noodlord’s picture

Is there not enough information here or has no one seen this problem before?

davemybes’s picture

Did you ever get a solution to this problem. I am trying to do the same thing. I can't even get an authenticated user to see someone else's contact form. If I eventually find out how its done, I'll post here again.

______________________________________________________________________________________________________

billtubbs’s picture

I've got the same problem. I get the message "Access denied You are not authorized to access this page" when I go to user/1/contact.

Interestingly, it only affects user 1, the admin user that was set up when I first installed the site. When I go to the 'my account' page of user 1 the contact form tab is not shown either, as it is on the user account page of other users. Also, there is no 'administer - settings - contacts' page as there should be according to the documentation on the contacts module.

All other users that I set up on my site do have the contact form and it works fine. Has anyone found a solution to this yet?

Bill.

billtubbs’s picture

The problem goes away when I remove a menu I had set up that points to 'user/1/contact' page.

When this menu exists user 1 has no contact form, or contact tab in the profile view. As soon as you remove the menu the contact function works. You can create links to 'user/1/contact' in content pages but not a menu.

The easiest fix is to make your 'contact me' menu item point to 'user/1' instead. Then people will be directed to the profile view, from where they will see a tab for the contact form.

I also notice that in my installation there is no settings page for the contact module:
administer >> settings >> contact

There is something clearly wrong with the contact module. Might be our installation. I used an automated installation by Fantastico onto my monsterhosting.ca server.

Hope this helps. If anyone finds a fix please let me know.

Bill.

steveg430’s picture

All my registered users got 'access denied' when they went to another users' contact page.
The only way I could get it to work was [in access control: user module] allow access user profiles for registered users.

I also enabled, for users, a menu link: 'user list'

Then, lo & behold, registered users can now go to another users' contact page & email them

googhome’s picture

I was having the same problem and spent the day debugging it. I've filed a bug report at http://drupal.org/node/103348.

Basically the problem is that permissions you give to anonymous users on the Access Control page aren't also automatically given to users who have logged in.

An easy work-around for this bug is to go to your Access Control page, scroll down to the Node Module, check the boxes next to Access Content for BOTH anonymous users and authenticated users, and save the page.

Grinin’s picture

I have a site setup for a client at BHNBC.com and I have a block I created as a directory listing for the users. Now, originally I made an overly complicated contact form hand designed in HTML using formmail... but now the client wants to use the built in "personal contact forms" for the users listed.

Now, when I am logged in, I can click on their name, and get their personal contact form, however when anonymous users visit the site, they get an access denied error message. It is crucial that I resolve this issue because they will not be having users register on the site, so they need anonymous users to be able to use the contact forms.

Any help would be great, feel free to contact me via my personal contact form on here.

Thanks,

Chris

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

davemybes’s picture

Try setting "access user profiles" for anonymous users in access control. On 4.7.4 this works for me.
______________________________________________________________________________________________________
Need help? Check the FAQ and the Handbooks, or try searching using fewer keywords to get more results.

______________________________________________________________________________________________________

Grinin’s picture

I had access user profiles as well as access personal contact forms enabled for anonymous users, but yet I still get an "Access denied

You are not authorized to access this page." error message... Its rather frustrating as it seems to be a very useful features... IT would save me the hassle of programming individual pages and utilizing form mail. I would love to know if there is a fix for this. In another topic area I saw a patch but it said it was for 4.7 I think.

Maybe its corrected in 5.1?

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