1

I need to unpublish my node after edit. For this I created a rule. It's doing the unpublish of my node after editing. But after this I am not able to again publish this node.

I also need to fire a mail to admin after update.

1
  • What should happen when a brand node is created? Should your scenario also apply in that case? Feb 17 '16 at 7:31
2

Here's how you can do this:

  1. Create a rule on node update event.
  2. Add Condition where user role is not "Administrator/Moderator". (This will make sure that the content doesn't get unpublish when admin is updating it.)
  3. If required, Add condition where content is of type "Article".
  4. Add Action "Unpublish content" under node section and save.
  5. Add another action "Send Mail" under System. Add required details to send email and save.

Above steps will unpublish content and notify site admin using email. After which site admin can navigate to "Admin => Content", review the content and approve. If you need to provide a custom/different UI, you can create a list using views and VBO module and allow site admin to Approve Content.

3
  • I set by default node unpublished for all user..
    – jsh
    Feb 17 '16 at 7:00
  • how to set this condition from rules Add Condition where user role is not "Administrator/Moderator ..
    – jsh
    Feb 17 '16 at 7:13
  • Under add action, select "User has role(s)", then in User Data selector set value as "site:current-user", select role as "Administrator", select Matching role as "Any" and lastly select Negate checkbox and click on save.
    – Yogesh
    Feb 17 '16 at 7:29
1

Your rule is firing for both node edits so you need to add conditions to your rules to check for the published status.

So for your unpublish rule, add a condition that the node is currently published.

The email to admin can be sent using a rules action.

2
  • not getting which event I need to select.. currently I am using After updating existing content of type Property event
    – jsh
    Feb 17 '16 at 6:39
  • Add a data comparison condition for the unupdated node's published field. Make it equal "published". The rule will only fire if that is true. Feb 17 '16 at 7:23
0

It will be better if you use Work bench access module .It provides various functionality and control over node publish.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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