Access denied on contact form of email field d6 only (d5 ok)

cwdrup - June 11, 2008 - 05:36
Project:Email Field
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

I like this module pretty much, but I have an issue with the d6.dev version :

I setup "contact form" in Display field, but it doesn't works for other users than user 1 (admin) : when another authenticated user clicks on the "Email contact form" link, he gets an "Access denied, You are not authorized to access this page. " message.
So :
- It works for user 1
- It doesn't work for other users

I tried to do the same thing with the same settings on d5 email field and it works fine.

Does anybody knows about what could be the issue in d6 only, or what I could have done wrong ?

Thank you

#1

ralessi - June 14, 2008 - 15:14

Hi,

I had the same issue on D6.

To fix it, edit the email.module file. Then go to line 250, and replace line 250 which is
'access arguments' => array('view', 1),
with
'access arguments' => array('access content'),

Alternatively, apply the attached patch.

Robert

AttachmentSize
email.module.patch400 bytes

#2

ralessi - June 14, 2008 - 15:18

I almost forgot: remember to clear drupal cache and the cache of your navigator as well.

Robert

#3

ralessi - June 14, 2008 - 15:37

Hi again,

Forget my previous two posts. Here is the way of fixing the issue:

1. Edit the email.module file
2. go to lines 249-250, which are:

'access callback' => 'node_access',
'access arguments' => array('view', 1),

and replace them with
'access callback' => 'user_access',
'access arguments' => array('access content'),

3. clear drupal cache and the cache of your navigator as well.

Alternatively, apply the attached patch.

Robert

AttachmentSize
email.module.patch482 bytes

#4

cwdrup - June 16, 2008 - 07:20

Hi,

Fine, thank you. It fixed the "Access Denied" issue.

Now, I have only the "E-mail not sent issue", because I fill the form, I get "mail sent message" but no mail in the destination box.

Thank you for your help.

#5

mh86 - July 30, 2008 - 09:51
Status:active» fixed

hi!
thanks for your patch. I committed it.

#6

Anonymous (not verified) - August 13, 2008 - 09:54
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.