Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
1
vote
1answer
59 views

How to send a Group email based on date field using Rules?

I'm using the Group module and I have a Group content type called Events with a date field. I am having trouble figuring out how use Rules to send an Email on the same day as the date field to all the ...
0
votes
1answer
40 views

How to transmit parameters to Rules Component upon using Rules Scheduler programmatically?

Now I'm trying to create a Rules Scheduler task programmatically. I've created a Rules Action with parameters and callback, also I've created a Rules Component with this Rules Action. But upon ...
0
votes
1answer
186 views

Is there a way to create a Rules component programmatically?

Is there a way to programmatically create a Rules component? I mean a component like the ones listed on /admin/config/workflow/rules/components.
2
votes
1answer
226 views

Notification of new comments for author and comment writers

I'm trying to implement a rule (in D7) that will automatically (no check box or opting out): send an email to the author of node if new comments send email to all users who have commented on that ...
0
votes
1answer
44 views

Rule + redirect

I want all my anonymous users to be redirected to a specific page. I created a rule for this : https://imgur.com/mUl8H9Q It works, all anonymous are redirected to the page "espace press" and they can ...
0
votes
0answers
52 views

How to create a postponed action programmatically?

There's a task. When user is registered he's assigned an advanced role, but in three month this role should be taken away. Could you clarify me, is it possible to create this action programmatically ...
0
votes
1answer
24 views

How to display items in Rules data selector in alphabetical order

Because of my sites having a lot of fields, it takes me a lot of time to select fields in the Rules data selector, because they are sorted by date created. What should I do to make them sorted ...
1
vote
1answer
288 views

How to create a rule to perform a redirect if user is already logged in and visits the homepage?

I have a Drupal 7 installation. In my homepage I have only two forms (login and register) so I need when someone leaves the site and the user is logged in, when he visits it again that he redirect to ...
0
votes
1answer
143 views

How to create a membership using rules, using membership entity module

I'm using the membership entity module, and the membership entity commerce module. I am trying to create a membership using rules, without success yet. There is one membership action available..to ...
0
votes
1answer
333 views

How to show authorized users a link for relevant Views results using the Rules Link module?

Assume a list of entities, created by the Views module. For example a list of "All blocked/active users" which looks like so: User name Active Created date Last login Hillary.Trump No ...
1
vote
2answers
48 views

Rules component works different when fired by cron

I have a Rules Component that I want to run every week, using cron. The component's elements: set a variable (emailbodytext) viewsloop 1 to fill the emailbodytext with titles of all recent nodes ...
1
vote
3answers
181 views

How do I add “Update Status of User” action to a view?

I want to create a user list with the Views module, to change the user status. I use the Views Bulk Operations module, but it has no Change status or Active user action. How can I enable (or change ...
2
votes
0answers
174 views

The context for node is NULL, but the context node in rules_node_is_of_type requires a value [closed]

I am working on Drupal 8 project I have made a content type by name glossary having machine name glossary Also, I have made one field in it, i.e. description having machine name field_description. As ...
1
vote
1answer
58 views

How do I create a tax calculation rule that runs by default before the customers address has been set?

With Drupal Commerce and the Australian GST calculation module, I have been trying to calculate taxes as early as possible. Most of the customers to the site are Australian and will have to pay the ...
1
vote
1answer
68 views

How to create a node and populate its fields with info from a completed goal?

I need to create a node and populate its fields with data from a completed Goal (implemented via the Goals module) using Rules. The completed Goal info is fetched using the method from the question ...
1
vote
1answer
609 views

Send email notification to node author with Rules

I am trying to notify the node author of a new comment on their node. Using Drupal 8.3 Created new reaction rule. Send to: comment.entity_id.entity.uid.entity.mail.value email address is not ...
0
votes
1answer
46 views

What is wrong in my Rules Conditions to trigger a scheduled unpublish of a node?

I have a content type 'company' which has a field: field-paid. This field is a integer list who only has 1 option: 'yes' This is my export of my rule: { "rules_testv2" : { "LABEL" : "Depublish when ...
1
vote
1answer
111 views

rules_invoke_component() - Getting the value of the Provided Variable

In my code, I am using rules_invoke_component() to invoke a Rules Component. On that Rules Component, have 2 variables. Parameter Provided I am successfully able to invoke the Rule and send the ...
0
votes
1answer
57 views

Forward user email address

I use Webform with Commerce product skus field. Now I have a rule to send out an email to customer if webform is submitted. That works fine. But I would like to set a rule to send the email when the ...
1
vote
1answer
86 views

How to create a rule that checks an extra profile field created with the core profile module?

I have a Drupal 7 site with the Honeypot module installed. Honeypot removes or prevents many spam registrations, but not all. I have extra fields added to the profile e.g. 'profile_field1'. I'd like ...
3
votes
2answers
422 views

Rules: Load List of Entities by Object or Entity ID (Performance)

I'm looking to load a list of Users by an Entity Reference Property within Rules. There may be times when I need to load hundreds or thousands of Users that have a matching Property to update a ...
1
vote
1answer
45 views

Why is Rules Link checking all Rules Links on every page load?

I am using the Rules Link module in a Drupal 7 site. The site contains a view that lists a number of entities, including the Rules link field. The Rules Link rule set is simple: when clicked, data of ...
3
votes
1answer
36 views

Rules: get content created by user account being cancelled?

Case: using Rules module, when a user account is cancelled, create a new node of type Archive and (a) copy select data from that account to the new node of type Archive, and (b) copy select data from ...
2
votes
1answer
133 views

Flags: flagging unflagging rules, how to check if an user has already flagged a node?

I'm using Drupal 7 and I created 3 flags for article content type; these flags are global flags: bad, nice and cool. Now, I want create a rule in order to check if an user has already flagged an ...
1
vote
1answer
99 views

How to send a push notification with Rules to specified user by grabbing UID from content field?

I want to send a push notification to a single Drupal, which, seems simple given the below screen shot. This works great when the user is always the same (I simply type in the UID). However, in my ...
1
vote
1answer
142 views

How to loop through a dynamic taxonomy vocabulary and if term is chosen, do an action?

My problem is as follows: I have a taxonomy vocabulary with terms, which are changing from time to time. I have two node types --> type 1 and type 2 Type 1 has a taxonomy term reference field Type 2 ...
2
votes
1answer
241 views

How to get the pre-save version of a field collection in rules

I have a node with a field collection called itinerary, and that field collection contains a user entity reference called traveler. The node can have unlimited itineraries and an itinerary can have ...
1
vote
1answer
71 views

Sender name in MimeMail send HTML mail rule

I have a local site I am testing. I have PhPMailer installed which works fine to send plain text email with the Sender name populated properly. However when I installed MimeMail and try to use the ...
3
votes
1answer
534 views

How do I get an argument of a path with Rules URL Argument?

I am trying to get the first argument of a path in rules. That argument would be needed to fetch an Entity. I have no idea how to "tell" Rules URL Argument "get the first argument". Then I tried to ...
0
votes
1answer
248 views

Split commerce cart to multiple orders per product

What's a solution in Drupal Commerce to create an order per product in cart during the checkout? The cart looks like this: Product A, Quantity: 2, $100 Product B, Quantity: 1, $199 Total: $399 The ...
2
votes
2answers
1k views

Rules fatal error during update: Call to undefined method stdClass::events()

What I have tried: Clear Cache. Disabled module and enabled it. Try with registry_rebuild, module_missing_message_fixer, variablecheck modules. Still getting the below error when I try ...
1
vote
2answers
363 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)...
2
votes
1answer
601 views

Setting data values in a paragraphs field with multiple values via rules?

Over the last few days I've been investigating and experimenting on how to use rules to alter fields within a paragraphs bundle on a node. The paragraph field on the node allows for multiple values(to ...
1
vote
0answers
34 views

Reaction rule raises TypeError

I have a working Drupal 8.3.7 installation and use the rules3.0alpha module. I add a reaction rule that is applied After saving new comment. That's all. Now, when I try to save a comment, I get an ...
1
vote
0answers
79 views

Apply a discount rule when calculating cart total?

I would like to apply a discount on cart items at check-out. The discount will be based on quantity of particular product type. What event can I use to calculate a discount during checkout? Here is ...
0
votes
2answers
20 views

Is it possible to alter the data passed into a Rule?

I have a bunch of Rules and some things require a bit more complex logic than usual. What I want to do is use a hook that runs when a particular rule fires, access the data that's passed in to it and ...
0
votes
1answer
259 views

How to make Drupal Commerce send email notification to the author of products sold?

I use Drupal Commerce and the rules module to send email which works OK. But it doesn't send the email to author node of product. Here is an export of my current rule: { "...
1
vote
1answer
58 views

How to fetch the completed goal as an entity with the Rules module?

Followup question for the question about "How to access fields from a goal when creating a node with Rules?". I'm trying to create a rule that finds and uses the fields of the goal that triggered the ...
0
votes
1answer
64 views

How to pass an argument to be used in the view called by rules

Context: drupal 7, views, Rules, Views_rules Goal: to send an email to all users that have the same taxonomy-term as the newly posted node Possible solutions known to me: (1) A Rule calls the view ...
1
vote
2answers
447 views

Display all nodes with identical field value to current node

BACKGROUND: Site is using content types which are auto-created through Rules, called CT-A and CT-B. CT-B represents a full URL, and CT-A represents that URL domain. CT-A is always created via Rules ...
1
vote
1answer
44 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
1answer
140 views

How to update a computed field in a rule's “set data a value” action

I have a custom field called field_balance in the user account form which is a computed field. It keeps the actual number of coins bought by the current user. That value is supposed to change (...
1
vote
1answer
64 views

Which entity to check in Rules to disallow taking a Quiz after passing it?

I need a way to restrict Quiz access for users who have achieved a passing grade to stop them retaking the quiz to gain more user points. It displays "You have already passed this Quiz.", but I can'...
1
vote
1answer
143 views

How to check Commerce product type of current line item in Rules?

When building a Drupal Commerce rule, I would like to loop over all line items and determine the product type for each line item. I would like to use the product type in a Rules Component to check ...
3
votes
1answer
496 views

How to check the value for specified field across all nodes?

I have minimal Drupal and PHP experience ... Problem: I have an autocreate function for a Content Type ('hannibal'), which has one defined field type ('faceman'). When Content Type 'hannibal' is ...
1
vote
1answer
391 views

How do I fill the authors name in a term reference field using Rules?

Content type stock contains the term reference field field_producer. What is the rule for Rules in order to fill this field with the node author name on creation? In detail The form looks like: -- ...
1
vote
2answers
390 views

How to check if user has passed the quiz already before granting user points?

I'm awarding users points for passing a quiz successfully. However, there's nothing stopping the user taking the quiz again and again to score more points. I have thought of these options, but I don'...
3
votes
2answers
458 views

What does Rules token “node:unchanged” mean?

I am on Drupal 7 and I am using the Rules module to do some stuff. I must say that I am not very used to using this module; there are few questions that need answers, such as the use of the node:...
4
votes
2answers
199 views

How to notify users when a new comment is posted in the same page as they did?

I have a Drupal 7 website and I display comments on a content type. What I want, is for every user to have a boolean field in their profile, to declare if they want to be notified when a new comment ...
1
vote
1answer
16 views

How to increase a scheduled time using a new field and rules component scheduler

I am working on Drupal 7 on a custom content type that is called Event. Each created Event is programmed to be displayed for 1 hour before been deleted. I am using rules component scheduler for that ...