-3

I have created a content type to apply for job. I have two roles, job posting and job hiring. When a user who has the role for job posting enters content, they get the Access Denied message when they try to save the content. Please see the attached screenshot. view when click on save button

view after click on save button

How can I fix this?

3
  • I believe this is a permission problem. Did you check if the permission are set correctly? Commented Mar 13, 2015 at 13:06
  • Install "Devel" and enable "Devel" and "Devel Node Access" modules. Should help you debug this.
    – Beebee
    Commented Mar 13, 2015 at 16:22
  • This is not the default Drupal behavior. We cannot debug a site to which we don't have access.
    – avpaderno
    Commented Mar 30, 2016 at 5:20

2 Answers 2

1

Based on the URL partially hide in your second picture, the user is trying to access to the node/add/need-a-freelancer.

If you say the denied page is display when user click on the save button, so there is a problem during the submission of the content form.

The strange, in this problem, is that the same user can access to this URL for fill the form, but not for save it. But it's the same URL...

For resolve the problem, I would :

  • Check if an admin User can submit and see a Need A Freelancer content.
  • Double check your custom code where you play with permissions to display page (maybe something wrong in a hook, like in an alter or in a custom validate function).

Hope that helps.

3
  • i am check all permission to save its content yes user can see and submit content of this content type Commented Mar 16, 2015 at 5:20
  • Did you use one or more hook_form_alter somewhere in your custom code ? Which sort of field did you have in your content type ? Did you use conditional field ? Maybe do you have an error message in your report error, if watchdog is enabled (admin/reports/dblog) ? Commented Mar 16, 2015 at 9:15
  • i am not add any custom code or validation check all values using dsm all are fine i think it has some connectivity issue with database Commented Mar 16, 2015 at 11:26
0

Looks not the node is not saved (maybe it really is) but only not visible for the user role. So please test if the node really is not saved (f.i. with admin account and / or direct database access).

If so, add to the user(-role) the permissions to view the content type.

Not the answer you're looking for? Browse other questions tagged or ask your own question.