Original Post: (http://drupal.org/node/117769)

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

That basically says it all... Anonymous users simply can't user personal contact forms for the users of the site. Though they have permission to access "site-wide contact form" and even gave them permissions to view user profiles...

Any help would be greatly appreciated

Comments

vm’s picture

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.

Grinin’s picture

It sounded like a good idea to me, so I logged in as one of the users, then logged back out. Yet the contact forms still do not work. "Access Denied"

Grinin’s picture

Anybody out there?

I can't be the only one having this issue? I have a pretty basic installation with minimal modules installed.

agentrickard’s picture

Status: Active » Closed (works as designed)

I took a deeper look at this and the answer is that you are misunderstanding the design of the Contact module.

The permission 'access site-wide contact form' merely gives anonymous users access to http://example.com/?q=contact

That page is a form that you administer at http://example.com/?q=admin/build/contact

That page can have multiple recipients.

By design, personal contact forms can only be user by registered users. If you hack the contact module to allow anonymous access to the user Contact form, you get this message:

You need to provide a valid e-mail address to contact other users. Please update your user information and try again.

Therefore, I'm marking this "by design" and asking you to try configuring the Site-Wide Contact Form listed above.

Otherwise, your only choices seem to be:

1) Request this as a feature of the Contact module. This is not a bug, it's a feature request.
2) Investigate the patch at http://drupal.org/node/113906 that you already checked.

Sorry if this doesn't seem helpful to you.

pwolanin’s picture

Also try the contact list module- makes it' easier to have separate "site-wide" contact forms for different users/topics.

This is already a feature request: http://drupal.org/node/58224

Grinin’s picture

The "hacks" point to patches made to 4.7 code. Has the contact module not been modified in 5.x? If so, I will apply the patches to the 5.x code and hope it works.

I suppose it would fall under a "feature request" but it doesn't seem like I'm the only one in need of this feature, and the assumption was that I could simply give the right permission to anonymous users to be able to send emails.

Thanks for the links. Hopefully I'll be able to get this working.

Chris

tunesmith’s picture

It's hard to see this as simply a feature request when other modules assume it's a built-in feature. For instance, the "contact link" module puts a "Contact Author" link next to nodes even if viewed by an anonymous user. Then if you click on the link, you get the access denied error message.

agentrickard’s picture

Status: Closed (works as designed) » Closed (duplicate)

No. It's a feature request because those other modules misunderstand the design of the Contact module.

Perhaps that design needs to be changed, however.

This issue is being worked here: http://drupal.org/node/58224.

Marking as duplicate.

agentrickard’s picture

Status: Closed (duplicate) » Closed (fixed)

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 3213)