user3362751
user3362751

Reputation: 1

drupal 7 user contact form access denied

We have a problem on a drupal 7 site. Logged in or anonymous users are not able to access other user's contact forms. Admins can access the forms.

We have set permissions to allow users and guests to access both the site wide and other users contact forms. Users can access the sitewide contact form.

If we give users permission to administer and edit all user accounts, they can view the contact forms. Obviously, we don't want to grant this access.

Any ideas to solve this problem?

Upvotes: 0

Views: 1328

Answers (5)

Max Starkenburg
Max Starkenburg

Reputation: 1539

We ran into this issue recently when testing some changes, and permissions were correct, but it turned out that any 5 submissions from the same IP address resulted in an "Access denied" message for an hour (unless logged in as an admin). This was a result of Drupal's core but hidden flood control/limit settings (to prevent spam/bot activity).

Workarounds we found (if necessary, though we just ran into the problem while testing contact forms more than normal) were either to change the default allowed submissions/time in settings.php by adding lines like the following (for example):

$conf['contact_threshold_limit'] = 10; # limits to 10 submissions from same IP
$conf['contact_threshold_window'] = 1800; # reset flood after 1800 seconds (half an hour)

or to install the Flood control module, which provides a handy GUI for changing these and related settings (i.e. login attempts) without having to bother editing settings.php (which would take precedence, I believe).

Upvotes: 0

akoshodi
akoshodi

Reputation: 151

I also had this problem. Feedback from anonymous users through contact form always returned "Access denied".

From the logs it turned out seckit module was blocking form submission with the following error "Possible CSRF attack was blocked." All I did to get the contact form working again was to comment out the "Base Url" in Drupal setting which I added earlier on.

Upvotes: 0

Wiilliam
Wiilliam

Reputation: 1

17/11/2014. I had the same problem. Go to:

Modulos-> Contact(Module) -> Permission -> In the column "ANONYMOUS USER" pick up -> "Administer contact forms and contact form settings", "Use the site-wide contact form", "Use users' personal contact forms".

It's works perfectly.

Upvotes: 0

Karina Klinkevičiūtė
Karina Klinkevičiūtė

Reputation: 1538

Go to People - Permisions, find a module "User", find a line "View user profiles" and set permissions there for your user roles.

Upvotes: 0

Mario Araque
Mario Araque

Reputation: 4572

This is a permission problem.

You have to set the permission to guest users to see this form. In Administer - Users - Permission.

Regards.

Upvotes: 1

Related Questions