Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
heyyo CreditAttribution: heyyo commentedEDIT: the rule works when i'm logged in but not when i'm anonymous user
Comment #2
crantok CreditAttribution: crantok commentedDoes 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
Comment #3
yan CreditAttribution: yan commentedThis might have to do with caching. On the rules configuration page I get a notice that the rule won't work on cached pages.
Comment #4
TR CreditAttribution: TR commented