I'm trying to redirect user which are not able to view/edit unpublished nodes to frontpage.

I used the folowing:

Event
"CONTENT IS GOING TO BE VIEWED"

IF
NOT Viewed content is published

ACTION
Page redirect (with nothing mentionned in "To" field, and played with check-boxes: "Force redirecting to the given path" "Immediately issue the page redirect")

But nothing happens, I still have the erro 403 page :

Access denied
You are not authorized to access this page.

Any idea ?

Comments

heyyo’s picture

Component: Rules Core » Rules Engine

EDIT: the rule works when i'm logged in but not when i'm anonymous user

crantok’s picture

Does the rule work for anonymous users if they have permission to view unpublished content? Maybe that event never fires if the access test fails.

FWIW this is the kind of job that I use Page Manager for. At least, I do since I saw Johan Falk's excellent free videos...
http://dev.nodeone.se/en/learn-page-manager

yan’s picture

This might have to do with caching. On the rules configuration page I get a notice that the rule won't work on cached pages.

TR’s picture

Component: Rules Engine » Rules Core
Issue summary: View changes
Status: Active » Closed (outdated)