Questions tagged [rules]

Use it for questions about the engine which allows site administrators to automate actions: the Rules module.

Filter by
Sorted by
Tagged with
2
votes
2answers
518 views

How to prevent users from being registered when their username contains a space?

I'm trying to prevent a user from being saved with Rules when he/she tries to use a username that contains a whitespace. I've already read How can I disallow spaces in usernames? and used the User ...
2
votes
1answer
2k views

How do I set up a shipping condition that accesses the value of a specific field in product?

I have a term reference field in product called "Weight" with values "Light", "Medium" & "heavy". I am using flat rate shipping service and trying to check the value of "Weight" field in ...
2
votes
2answers
131 views

How to apply flags retrospectively for group subscriptions using Organic Groups?

We've a large site running Drupal 7 with OG, Flag, Rules, etc. OG uses a subscription model where you have to confirm you want to join a group (or leave a group) so we've decided to move to a Flag ...
2
votes
1answer
839 views

How to check in a rules condition if an image field has value?

Is there any way to check if a field has no value (image field) after saving the content in Rules? I tried Data Value is Empty, but it doesn't work! Output of the rules: { "...
2
votes
3answers
154 views

How to change user info with a rule when Points are granted to user (using userpoints module)?

I need to create a rule to change info of a user when this user is granted with points using the http://drupal.org/project/userpoints module. I need the rule to have a condition and action like: if ...
2
votes
1answer
805 views

How to limit number of nodes a user can create per day?

In order to curb ardent spammers in Drupal 6, I'd like to limit the number of forum nodes that an authenticated user can create per day. So for example ordinary users can not create more than 3 posts ...
2
votes
0answers
889 views

How to create a Rules action set to calculate a sum of integers in a Field Collection?

I'm having a Field Collection 'My List' with two fields: 'Amount' (integer) and 'Date' (date). I often count the 'Amount' items with Rules like this: Add a variable: Parameter: Type: Integer, Value: ...
2
votes
1answer
3k views

Drupal 7, Rules, Convert text to date and set a date field

I've some string like "11/28/2012" and i want use to populate a date field in my nodes/entity. In rules i use "set a value", select the date field and add php code: $mydate = field_get_items(($...
2
votes
2answers
1k views

How to use Rules to redirect a user based on URL argument?

I'm using Drupal 7 and the Drupal Commerce module. I'm now able to capture an argument passed by URL using Rules (thanks to this helpful thread). However, I'd now like to be able to redirect the user ...
2
votes
1answer
289 views

How to know when a node is going to be deleted when using Rules Event “Before saving content”?

I'm using a rule with Rules Event "Before saving content", but this rule is also executed when I delete the node. I'm recalculating some fields, I don't need to do this when the node is going to be ...
2
votes
1answer
269 views

Additional classes for price based on price components

Is it possible somehow to add classes related to price components to the price container div? So you would be able for example to style a price based on how it is changed by its components. I thought ...
2
votes
1answer
1k views

Update values of multiple value field programmatically? (Rules action)

I'm trying to create a rule to populate a multiple value order reference field in Drupal Commerce, on checkout complete. I haven't been able to achieve this through Rules UI, so instead I'm trying to ...
2
votes
2answers
486 views

Get organic group name in a rule?

I want to create a rule that sends an email to all users of an organic group when content is posted to that group. In the email I want the name of the group to appear in the subject. I'm completely ...
2
votes
2answers
3k views

execute a php code after a user login

I see that triggers page is changed from the version 6, It's pretty wierd.. I can't find When user logs in execute a php code thing... What I have to do is exactly that.. control some user roles ...
2
votes
1answer
117 views

how to obtain fivestar field value in rules?

I'm trying to a grab a value of a fivestar field within rules and having no luck. Basically I'm getting users to fill a feedback form and if the fivestar field value is less than 3 Stars then I want ...
2
votes
1answer
156 views

Loop through all entities with rules

I have a content type (called Issue dates with fields called field_issue_date (date type) and field_issue_type (term_reference)) and by using Rules module 7.x-2.9 I want to check if the taxonomy field ...
2
votes
2answers
968 views

Is there anyway to get more control over when CRON runs? [duplicate]

I've just setup some rules using the Rules Scheduler module. Everything is working as expected, except that when a rule is scheduled for 10:30am, it might not run til 11:00am, because that is when ...
2
votes
1answer
78 views

How to access rules condition values in the rule event?

I have created a rule (using Rules) in which I added 3 conditons. Now I want to access the conditions values in the action that on which condition the action is performed. I am attaching the ...
2
votes
1answer
371 views

Minus Userpoints for down votes

I have configured Vote up/down module for voting. For every vote, content author will be awarded 5 points for up-vote, but i am facing problem for down votes! i can not understand how to minus ...
2
votes
2answers
691 views

Triggers on node creation of certain content-type

It is a question that always gets answered by "use rules module." Unfortunately, this site depends heavily on a few actions and triggers already, and a migration is not in order. Are there trigger-...
1
vote
1answer
647 views

How to delete a scheduled task using Rules Scheduler?

I use the rules scheduler module (D7). So far all fine. What I use it for: a user registers with username and email this users then gets 4 emails over the next four weeks, sent by the scheduler BUT:...
1
vote
1answer
79 views

How to delete a content in a view with view rules? [duplicate]

I got two views that displayed two different type of contents. Content A got a field "Title" and content B got the same field. I want to find and delete any number of content of type B that got the ...
1
vote
1answer
321 views

Rules to Flag a node referenced by Commerce Order Line Item

I have a site selling edit access to specific nodes. The site uses Drupal 7, Commerce, Commerce License (selling a Role with edit permission), Rules and Flag. On the Add to Cart I have a Line Item ...
1
vote
1answer
77 views

How to hook into “visiting the website”?

My main problem is very similar to How to grant userpoints to users who perform a login 5 days consecutively?. As Mike correctly notices in his answer on that question, his solution will not work for ...
1
vote
2answers
342 views

How to fire a Rule after adding a new file in multi-value field?

Working with Drupal 7.56, Rules 2.10, Conditional rules 1.0-beta2 and File Entity 2.4 I can't fire a rule when I add a new image in a multi-value Image field (related to File Entity for inline fields)...
1
vote
1answer
294 views

Send email with profile2 fields with account email token in rules

I am trying to send an email to users contains information they put into their profile2 fields when they registered on the website. My problem is that their is no email field token available in rules ...
1
vote
1answer
372 views

Show system message to user when node is published

I'm looking for a way to show a system message to the author of a node, when the node gets published (by an administrator) I think this must be achievable with Rules, but browsing the web and ...
1
vote
1answer
227 views

How to correct my Rules Component to perform VBO operations for the Group module?

I followed the instructions included in the answer to the question "How to implement the mass operations on the Group's members page using Views?". The 2 Rules Components in it (to either block or ...
1
vote
1answer
936 views

node:url token not returning clean (alias) URL

This is a follow-up question of: How to delay the execution of a rule for 5 minutes? When not delaying the action, the node:url token does not return the alias URL, but the URL with the token ID: ......
1
vote
2answers
45 views

How to create a rule which after several updates in 5 minutes of a node sends 1 message?

When a node is being updated I have a trigger for this in the rules engine. I want a notification of this in the email. The node is however updated several times in 5 minutes. I only need 1 ...
1
vote
1answer
266 views

How to redirect user using Rules when user visits a link with view?

I have a rule that redirects a user when visiting a view. But it does not work with the event "view page" or "Drupal is initializing". Here is the rule: { "rules_uid_141" : { "LABEL" : "uid=141", "...
1
vote
1answer
1k views

Email sent to customer from Drupal has RED LOCK icon in the email

I'm using Drupal Commerce. Overall it's working well. I have SSL setup and enforced so users HAVE to use 'https' (via .htaccess). I'm able to test fill out the form and it submits. PayPal gets the ...
1
vote
1answer
33 views

How to display a Rules Link only if access to display the linked content was granted?

I'm using the Drupal Commerce 7.x, Rules Link, and Content Access modules. In my site Classified ads can be created, and then people can use credits (via User points) to pay for unlocking "contact ...
1
vote
2answers
355 views

How can I produce a non-blocking process to modify newly created nodes of custom content type?

I have a custom content type called a Scan where the only required field is ISBN. Nodes of this type are created when a user POSTs to my REST API endpoint with an ISBN number. That's all working fine, ...
1
vote
1answer
401 views

How to send an email to all members of a group after the group is flagged?

I use the Group module. I create a flag to mark groups. I wish that when a group is marked, an email is sent to all members of that group. How to do this ? I created the following rule, but I find ...
1
vote
1answer
505 views

How to pass arguments to a view from Rules?

I am trying to use a view which depends on arguments but somehow it seems that the arguments are not passed to the view since I am getting no results. The view works when executed directly. The rule ...
1
vote
2answers
3k views

How to use variables in a PHP evaluation in a rule?

I created a rule with the actions "Provide a variable: mynumber" and "Grant points to a user". I'd like to evaluate the points with PHP, using "mynumber". For some reason, I can't use $mynumber, ...
1
vote
2answers
118 views

How can I schedule adding a new field collection item for all users?

My users have a field collection, called 'Score', with two fields: 'Date' and 'Points'. I'd like to add a new field collection item for all users at the end of the day, with the current date in 'Date' ...
1
vote
1answer
242 views

Delete nodes using Rules and VBO

Rues and VBO are not working as expected to delete nodes. Can someone tell me what I'm missing? Thank you. What I have: A View with VBO field which successfully selects all nodes of a certain type ...
1
vote
1answer
286 views

How to force a cron run after a Rules component is scheduled?

This question is a sequel on Why is the database not updated before a next Rule is launched?. I have a Rule that schedules a Rules component 5 seconds after the current time (this number is ...
1
vote
1answer
567 views

How to validate dependent fields for a content type?

In one of my content types I have 1 field 'venue' with a drop down option. If I select 'venue' as 'other' from the drop down, some other fields (say 'venue address' and 'venue name') should become ...
1
vote
1answer
43 views

How to access fields from a goal when creating a node with Rules?

I'm trying to create a rule with the Rules module that posts a node when users achieve a goal (using the Goals module 7.x-1.3). I want to get fields from the goal like the goal image and other fields, ...
1
vote
2answers
69 views

How to grant User Points to viewing user when user has viewed content?

Can anyone provide me with a simple rule that adds 1 user point to a user when this user has viewed an entity of "Article" (for example)? I have enabled the User Points module and the "Userpoints ...
1
vote
2answers
550 views

How to hide Fivestar rating field after first comment?

The accepted answer on How to limit a user to one vote when using Fivestar? doesn't work for me, but the author hasn't provided a solution yet, so I felt this is worth a new question. My goal is ...
1
vote
3answers
57 views

How to use the Rules module to lock English nodes from editing?

I need to lock all English nodes from editing because translators sometimes change English nodes by mistake instead of creating translations for them. Can it be done with Rules? I guess it might ...
1
vote
1answer
209 views

How to access node properties of another node using the Rules Link module?

I wonder how to access node properties via another node with Rules. I already store the link of my other node in a field (of the original node), but I don't know if we can do that. I'm using the ...
1
vote
1answer
185 views

Block Node Access After A Certain Amount of Views

I've come across a client requirement in Drupal that is very new to me. The website is subscriber based, so users pay to subscribe at which point they are granted a subscriber role. They then have ...
1
vote
3answers
1k views

How to create a view of all recent activity on a site?

I want to create either a view or a module (preferably view) to display all recent activity on the site such as a new user joined in, a user read some article or blog, a user gained some points and so ...
1
vote
0answers
86 views

How to correct my Rules Components to perform VBO operations to add or remove a role for the Group module?

I followed the instructions included in the answer to the question "How to implement the mass operations on the Group's members page using Views?". The 2 Rules Components in it (to either block or ...
1
vote
2answers
64 views

Why can my view not access the data of a new node when using Rules event After saving new content?

Using the Rules module and Drupal 7, I set up a rule "After saving new content of type X". This is what I want to happen when adding a new content of type "X": Based on its nid, call a view, which ...