3
votes

So I've enabled the site-wide and user contact forms through the Contact module, enabled ALL of the permissions (for good measure) under the Contact permissions for ALL roles. The contact form tab appears and is accessible for all users when I'm logged into my Admin account, but doesn't appear for any other user role.

I've scoured all over Drupal forums and can only find people making the mistake of forgetting to change permissions or enable the personal user contact form. I've flushed all caches and run updates, done everything I can think of.

Any ideas on what might be causing this?

5

5 Answers

4
votes

I was hitting a very similar issue in respect of giving Authenticated the permission Use users' personal contact forms, then logging in and going to user/[uid]/contact results in Access Denied.

Simply I hadn't picked up that each user has to opt in to being contacted via the Personal Contact Form.

EDIT - in a comment below @tanius has provided a link to some code that could be used to mass update the settings for 'opt in' to personal contact form.

2
votes

If you trip the flood filter you will also get an access denied page. You should get a system message saying "You cannot send more than 5 messages in 1 hour. Try again later.", it prevents you from even seeing the page via the access denied text.

If this is the case, you can resolve it by going to the flood table and deleting some of the entries it. It bases it on IP address so just knock a few of those out.

2
votes

Give site wide contact contact form permission using code :-

<?php
function mymodule_menu_alter(&$menu)
{
  if(isset($menu['contact']))
  {
    $menu['contact']['access callback'] = TRUE;
  }
}
?>

* mymodule is your custom module name.

1
votes

Try this :

1) go to admin/structure/block 2) Find the block of your contact form 3) Click Configure 4) Check visiblity settings option - roles

Make sure none are selected so that it will be shown to all roles.

Hope this helps.

Cheers, vishal

0
votes

I had the same issue. This is what I did.

Go to Structure --> Blocks

Find here "Main content" and from drop-down menu choose "Content" field. Save your settings and check.