So I have a setup so anonymous users can submit unpublished stories and this works fine except after the anonymous user submits their story, they get:

Access denied
You are not authorized to access this page.

Any reason why this is?

Comments

camhoward’s picture

I ran into this issue as well. I believe it is because the story is unpublished when submitted and anonymous users cannot view unpublished content.

Here's how I solved it using Workflow, Trigger, and a redirect:

  1. Install the Workflow module (http://drupal.org/project/workflow) and set up a workflow for content submitted by anonymous users so it goes through an approval process.
  2. Create a node called "Thank you for your submission" (or whatever is appropriate for your use case).
  3. Go to Site building > Modules > Core - optional and enable "Trigger."
  4. Go to Site configuration > Actions.
  5. In the "Make a new advanced action available" at the bottom of the page, select "Redirect to URL" and specify the "Thank you" node you created in step 2.
  6. Go to Site building > Triggers > Workflow and assign the redirect action to a trigger, such as when the content type moves from "creation" to "review" (or "draft" or whatever term you used when you set up your workflow).

Now when an anonymous user creates content which uses this workflow, they will see your "Thank you" page instead of the "Permission denied" page.

Hope this helps!

Cablestein’s picture

Hey just confirming the above works for me.

dreamriks’s picture

Hi
The above method workd but I have an issue. I was creating a question answer system where the newly submitted question remains unpublished on submision. Now to redirect the user to thankyou page I used the above method but, now any content that is created is redirected to this new thank you page.
I wanted this redirection to be only for one question content type.

Anu solutions??????