Drupal 7: Contact Form Not Visible, Despite Permissions - drupal

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?

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.

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.

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.

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

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.

Related

How to buy particular products without login in drupal commerce

I am new working in drupal-commerce module .Currently the system I have is that a logged in user should buy products from my site but there are two particular product I need to my users buy without doing any login . Is it possible in drupal-commerce ? My english is not good so if anyone have any query regarding my question please ask me.
Please help me if there is any solution to this .
Thanks
Purchasing without creating accounts? It is possible.
It is possible to purchase products without creating an account.
By default anonymous users aren't permitted to complete the checkout process. What you need is grant them the Access checkout permission. Changing this permission is really easy:
From /admin, click on the People link, then Permissions
Under the Checkout section, grant the Access checkout permission to anonymous users
Click Save permissions.
Now anonymous users can use checkouts.
How to setup your site to always be anonymous
There is another way to accomplish this, however it is more complicated and possibly you don't want this, I'm just sharing if so.
Users on your page don't have to be logged in (authenticated) or anonymous. To setup your site to always be anonymous, you have to disable only two rules.
The rules can be found by going to the Store Configuration screen and selecting Checkout Settings and then selecting Checkout Rules.
Assign an anonymous order to a pre-existing user
Create a new account for an anonymous order
Disabling these rules mean the users can't login to see their Orders, however it has no side affect to being able to purchase items.
If you want to read more about this, check out this page.
Hope that helps

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?
This is a permission problem.
You have to set the permission to guest users to see this form.
In Administer - Users - Permission.
Regards.
Go to People - Permisions, find a module "User", find a line "View user profiles" and set permissions there for your user roles.
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.
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.
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).

password protect a single page, and do not show any admin menus to the user

I've tried the "Protected Node" module, but that goes to the 404 instead of the password prompt page which it's supposed to give.
Also tried the "Simple Access" module, and after getting it to control access, realised that it still shows users the "edit" menu and there doesn't seem to be a way to switch it off for them.
Thanks to anyone who can help.
I have used the "Node Access" module before. But for one site I had to work on recently, I needed something that allows me to restrict access for anonymous users on a single page. Only visitors, who have received the password should have access.
Installing the Node Access module and creating a specific role seemed to be an overkill for this limited requirement, and I went with the "Protected Pages" module, which allows to set a password for a certain path. (d7 only)
Access to the admin is usually controlled via the user permissions as for limiting access to a specific page, this could be achieved with Panels.
Use NodeAccess module to restrict that page based on role.
Users with the 'grant node permissions' permission will have a grant
tab on node pages which allows them to grant access to that node by
user or role.

How can I display a message to the user after they request a new password on my Drupal-based site?

I work primarily with WordPress sites, and I have minimal experience with Drupal. Only about 1/100 of my sites use it, so I usually don't need to worry about it.
Right now, however, I need to add an alert after a user requests a new password on a Drupal based site. The alert is to tell the user that they need to check their email for the new password. It doesn't even need to be a popup, the message just has to be there.
I've been wandering aimlessly through the site's files and backend and all across google but I can't find any solutions to this. A solution would be great but I'd appreciate it if anyone could even point me in the right direction to figure it out myself. Please help!
Edit:
I have checked the triggers page and there is nothing there that can help. I also read about a module called password_trigger which sends an email alert. The site is set up to send an email already, but it's not using this module. Help?
If that is not showing, double check that <?php print $messages; ?> is in your page.tpl.php theme file.
Are you sure this won't happen by default?
I just went to one of my Drupal 7 sites and did this:
clicked Request new password
typed in my user name
clicked Email New Password
Drupal displayed a message that said
Further instructions have been sent to your e-mail address
Does that not happen for you? (If not, which version of Drupal are you using?)
I'm not clear about the email part of your question. Is Drupal sending out an email to the user when a new password is requested?

Facebook like frontpage for anonymous users

I'm currently building a site where I want anonymous users to see a page which talks about what the site is about, but shows no content. It only offers two options
Register
Login (username & password field)
Once the user logs in, they should be redirected to a specific frontpage.
I tried using drupal/front module, but that did not work. Anynmous access was always shown as access denied
I think I could LoginToboggan to redirect authenticated users but not sure what to do about the frontpage.
thanks
When you say that you want the front page to show now content you really just mean you only want to show static copy right?
One way to do this is with views and the context module.
Create blocks with views of the content that you want to hide.
Create some regular blocks from the blocks menu.
The magic happens with the context module. It lets you set up custom rules for which blocks to display where and when. You can set it so that some blocks show up for anon users and other blocks show up for authenticated.
Set it up so that the static copy that talks about the site shows up for anon users along with the login block.
You can tell context module load whatever content you need on the home page with views generated with blocks.
Set up context module to load all of your blocks for you instead of drupal's core block system.
I'm sure you could do this somehow with panels too, but I couldn't tell you how.
Make sure that the page you are redirecting to is accessible for anonymous users. The most likely reason for your acess denied message is that anonymous users do not have permission for that page.
You could also try the Rules module to redirect after login.
Checkout my response to a similar question answered on Drupal.org. I'll repost here as well:
http://drupal.org/node/1962546
I also used Context but with a few other items to help.
I've done this, not with Facebook or LinkedIn however but with another
login based site.
Required modules: Omega theme Context Delta Views Some type of access
control Custom version of r4032login
How I did it: All content is locked down. r4032login redirects all non
logged in users to login, even if they try to get to a certain page.
Create a new delta: In here I have create a content region and shown
only what I need (custom login page).
Context Checks User Role must be anonymous user It then has a rule to
activate a delta, which is basically a copy of your theme
functionality: (Homepage login)
The login is set to forward the user to /frontpage which is a view, it
requires authenticated permissions to view. Once a user is logged in,
the redirect module forwards to the /frontpage (main page) and
permissions are verified and they're in.
If you need more details let me know. This is more of a complex
implementation I have in place but I'm sure there are also others
interesting in doing it.

Resources