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
4
votes
2answers
769 views

Send mail notification when node of given type gets created

Use case: a small site where I want to warn all users by mail whenever a new content of a particular type is created. I thought I would try Rules+Actions to handle this. I'm working on a vanilla ...
1
vote
1answer
512 views

Domain Access Login Redirect for main domain and subdomain

I have created three sites namely one.example.com, two.example.com, three.example.com using domain access. Here one.example.com is the main site which can create n number of subdomains. I want to ...
1
vote
1answer
531 views

How to apply (% off) commerce discount for second and next items only if line item quantity > 1?

Using Commerce Discount and Commerce Discount Extra modules there is no problem to set discount rule condition for product type and quantity. This way I can set up 20% off discount that is applied for ...
1
vote
2answers
38 views

Rules scheduler reacting on last comment?

I have a content type with comments activated and would like to have a rule that triggers a component when there is no new comments posted after a week. The component works as designed with rules ...
2
votes
2answers
938 views

Programmatically creating a node doesn't save custom fields

I'm using this code in Rules, after saving a certain type of content, in execute custom PHP code. By now, i'm just trying to create anothe node of that type after the first is created. The problem is ...
24
votes
5answers
7k views

How can I quickly re-save all the nodes on my site (to trigger a rule that activates on content update)?

I made some mistakes configuring a certain content type on my site. To fix these mistakes, I made a rule that performs some actions "when existing content is updated." However, I don't want to go ...
1
vote
1answer
640 views

How to prevent a node from being saved/updated by using the Rules module?

I've created a content type 'H'. The following rule (using the Rules module) has been built to prevent the node from being saved/updated if the field 'a' is larger than 5. Event: Before saving ...
0
votes
0answers
9 views

Get the name of a Reaction Rule programatically

My module prvides RulesAction plugins (extending RulesActionBase) which can be used by admins when building reaction rules. In some cases the action is not valid and when this happens and the rule is ...
0
votes
1answer
54 views

Add Attachment to Rules Email - Drupal 8

I am trying to set up a simple rule in D8 that when a new node is created, an email is sent out that includes an attachment from the file system. How can I accomplish this?
1
vote
1answer
369 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
1answer
579 views

How do I get rules to select a random node?

I'm working on my cron rule that will post to twitter every cron run. Thing is for this rule I need it to post a random node that either conforms to specific values in certain fields, or does ...
1
vote
1answer
514 views

emailing users in user reference field with rules

I am working on a site for an academic conference. Right now, we have two content types (1) proposal and (2) peer review. In the proposal content type, an author can add multiple presenters to a user ...
3
votes
1answer
379 views

How to automatically modify a field after saving content?

I have posted this question on drupal.org (via a comment titled "field modification triggered by saving action"), but I realized that the thread is more than five years old. So I reproduce here the ...
0
votes
1answer
545 views

How Do I Change Order Of Commerce Completion Rules In Checkout?

Perhaps a noob question, but how do I change the order in which Completion Rules fire? There is a default Reaction Rule called 'completion'. I wanted to add a 2nd Rule which executes some custom PHP ...
2
votes
1answer
564 views

How to implement a Rules Action to loop through quantity of a products bought?

With the Drupal Commerce module, I created a new product type I use for selling points to my customers. The product has a custom field named “points” (field type integer) where I specify the amount of ...
1
vote
2answers
627 views

How to grant permissions for some role to execute custom Rules Components?

I created a view (table) and i asociated views bulk operations. I created 4 rules components. I have permissions only for user/1 (admin). Another user role (eg. editor) can't see these options. "...
1
vote
1answer
567 views

How to copy select list value from a webform submisison into select list field new node?

This is the scenario: A webform with the following fields Question -> Textfield Category -> Select options (Listbox) Listing vocabulary HETCAT A content type Question with these fields Title ...
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:...
2
votes
1answer
621 views

How to check in a rule if the data from a field collection has changed?

I want to add a rule (using the Rules module) for printing a message after changing a field in a field collection. The field collection consists of the following three fields: Reference to Version (...
0
votes
1answer
605 views

Rules token one-time-login-url is showing up empty

I have a rule that, after submitting a webform, a user gets created and then sends two emails to that user. One saying their form data is being looked at by someone for review before they get a ...
1
vote
1answer
637 views

How to trigger a rule if a node has a certain Taxonomy term?

I'm trying to create a rule using Rules that will apply a watermark to an image within a node (using the ImageCache Actions module) if that given node has a specific Taxonomy term. For example, nodes ...
1
vote
0answers
13 views

How to mark related entities as dirty in search api module when edited?

I am using Drupal 7 with the search api. I understand that one of the 'common pitfalls' of the search api is 'Changes in related entities don't lead to re-indexing'. I am bringing in a field called '...
0
votes
1answer
648 views

Simple webform with payment module

what I need do is not an ecommerce site. On my drupal website I need a simple web form with a payment (by paypal) and a node reference field prepopulated (by the entity refence and entity reference ...
1
vote
1answer
873 views

Rate module and rule integration

I don't fully understand how the rate module integrates with rules. Here's my situation: 1) I created a widget of the type: Number up / down widget which allow users to vote in nodes of the Answer ...
2
votes
1answer
596 views

Drupal and node.js configuration

I have a problem with Nodejs and Rules action with node.js modules First, I have installed node.js on my server following the README.txt instructions and then configured the node.config.js file as ...
0
votes
1answer
878 views

Get the displayed node of a commerce_line_item in a component rule using 'commerce_display_path', doesnt work

I ve found something quite interesting in an other post Discount based on a field in product display node in Drupal Commerce? It describe a way to get the 'node display' associated with a line_item ...
0
votes
0answers
29 views

SMTP + mimemail + mail system not sending to hotmail

I have a webform which sends two emails upon submission: To the administrators of the site via webform emails To the client who submitted an email via rules using 'send html email' Everything is ...
1
vote
1answer
424 views

Where is the “Send mail to all users” action?

I installed and configured the Rules module. When I try to add a rule like notifying a new comment to all users, I do not see the Send mail to all users action. Is that normal? Is there any other ...
2
votes
2answers
1k views

How to fix rules which unable to evaluate action?

I have created two rules to act on some events related to commerce products. The first is to act on reference node delete event, to remove the product upon node delete. the second is to delete the ...
2
votes
1answer
2k views

How to use Webform values in Rules?

I am using the Webform Rules module and I created an event 'After submitting webform', and an action 'Fetch webform submissions'. When I add an action 'Show a message on the site', I get all the ...
1
vote
1answer
745 views

Is there any way of removing (or unflagging) all of a user's flags?

I have a situation where a privileged user (role that is purchased) can flag content and receive email notifications to comments posted. When the role is expired, I need for them to stop receiving ...
0
votes
1answer
997 views

How to send an email once every 6 months using the Rules module?

How to send an email once in every 6 months at 12:00 am for a date field about user renewal which is there in user profile using the Rules module? Its mail should send in cyclic form every once in 6 ...
1
vote
1answer
1k views

How to resolve Catchable fatal error in entity.inc?

Locally (WAMP) I have created a new GIT branch to install Drupal Commerce on my site. Everything went well and I have begun configuring my new shop. But when I decided to pull this branch into my ...
1
vote
1answer
686 views

Pass multiple ids as Views Arguments in the Rule action Save PDF as file on server

I'm using views PDF to print out a list of nodes on a single PDF, one per page. Now I have more than 1000 nodes/pages on a single generated pdf, so I'm trying to use VBO and Rules to create a view ...
4
votes
2answers
1k views

Upload file and fill in fields in one step; or trigger a rule when a file is uploaded

I want to make use of the Media module and the File entity module to upload files, in particular images, to my site without having to attach them to a node. Solely uploading images works like a charm, ...
2
votes
3answers
2k views

Send email when order status is changed [closed]

I need to send a message to the customer when I change the order status (e.g from pending to processing-completed-canceled). How can I do this with Rules?
1
vote
0answers
26 views

Why doesn't Rules Conditional recognize a hidden field value?

I'm using Drupal 7. I have a simple "email confirmation" system set up using rules. The setup is this: "Reservation" Content Type has a boolean check box for "confirmed". "Reservation" Content Type ...
5
votes
1answer
846 views

How to add multiple products to cart at the same time with attributes

I have different view blocks that display multiple products on the same page, each product has their own attributes such as product bundle and custom line item, these serves as an option set / ...
0
votes
0answers
38 views

Checkout rule 'Create a new account for an anonymous order' not accepting mobile number field

I am using Mobile Number module to enable OTP verification. Also, with Drupal commerce, I have also enabled anonymous checkout. During the execution of the rule Create a new account for an anonymous ...
0
votes
0answers
20 views

Block or ban ip addresses based on site-wide contact form category

How to create a rule with the Rules module that blocks or bans ip addresses based on the category that they selected on the contact form for anonymous contact submissions via the site-wide contact ...
1
vote
2answers
685 views

Rule to fire only on first time publish of node

We are using workflow moderation for some content types and sent out emails to the author once a node has been published. Sometimes we have the case that an author changes a node after he has been ...
2
votes
1answer
993 views

How to send an email using a field key?

I am attempting to send an email to a field selected value using the Rules module. The user selects a faculty member and saves the node. The rule should fire off and email based on the field's key. I ...
1
vote
1answer
802 views

How to pass parameter to 'options list' attribute in hook_rules_condition_info?

I am declaring a condition in which I have the following parameters: 'node_type' => array( 'type' => 'text', 'label' => t('the node type'), '...
0
votes
2answers
24 views

delete scheduled tasks fails when task identifier is account:uid

I have an action set as a scheduled task that deletes a user, that seems to be working fine: { "rules_delete_unregistered_user" : { "LABEL" : "Delete unregistered user", "PLUGIN" : "action ...
3
votes
1answer
2k views

How to prevent a PDO exception when using Rules to Set a data value after saving new content?

I need to do a simple thing. Write a rule that edits some elements of the node, as soon as it is created. Unfortunately Drupal doesn’t like that and crashes whenever you try to save the node within a ...
0
votes
1answer
390 views

Rule to send an email on node save printing a field value of a referenced node

I am using Drupal 7, and the modules References and Rules. I created two content types: A and B. A has a field (A:b_nodes) which is multiple node references of B which has field (B:time). How can I ...
0
votes
3answers
2k views

Send Mail After Checking Date Field Value

My content type (product) has a date field named Expired Date. All I want is like this: check value of expired date field from content type product. If value equal to 7 days from now, send mail with ...
3
votes
1answer
1k views

How to embed a Rules Link in a View in order to trigger a Rules link to run?

What is the general process to embed a Rules Link in a View in order to trigger a Rules link to run? I have used the Rules Link module to create a Rules Link embedded in a View (it's a View that ...
1
vote
1answer
354 views

Send email with custom tokens on event?

I am trying to make a rule which when acted upon will send an email with custom details based on the rule arguments. I made my rule event and that's all working fine it shows up, but when I add an ...
2
votes
1answer
46 views

How to make Shipping services available in Rules tokens (data selectors)? [closed]

I am using D7 and Drupal commerce, with a flat rate shipping service. In my country the VAT for both products and shipping costs must be included in the total VAT amount. But the only line items ...