Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rules]

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

0
votes
0answers
9 views

Rule to create an identical entity to the node created then delete node

I have a content type called "article" and an entity type called "article 2", they both have identical fields. When I create an article node and save it I want a rule to fire that then basically ...
0
votes
0answers
9 views

How to send an email to an user after user account field is edited?

I created a paragraph field with "Title", "File", "Observation" and "Approved" (only mods and admin have acess to this field) and attached it to a user account. The user has acess to the form that ...
0
votes
0answers
25 views

Sending an email to everyone with a certain role using rules in Drupal 7

Thanks for reading! Me: Small business owner with no coding or Drupal background who wants to learn by doing instead of hiring a developer for every small thing. Goal: I have a Drupal 7 website and ...
-1
votes
1answer
23 views

Alter serialized json output

Everytime a node is created, I have a Rules Action that serialized the data into json and send it to OneSignal. I have the below code that does it... $entity_id = $entity->id(); // Getting ...
0
votes
1answer
15 views

Programmatically / by Rules, remove reference of a deleted user from contents created by that user.

A user [content_editor] got deleted and the content created by this user is referring to anonymous user. While an administrator is editing that content, administrator is receiving user doesn't exist. ...
1
vote
2answers
29 views

How do I change the field value of multiple nodes?

I'm working on a Drupal project where users can post classified ads. These are simply nodes created using a custom content type. After 3 months, we want the user who created the node to receive a ...
0
votes
0answers
17 views

How do I schedule a content reminder?

I'm trying to create a scheduled rule that is triggered every time a node is either newly published or an existing node is updated to schedule an email alert in three months to alert users in a ...
0
votes
0answers
23 views

Rule to update or set value of a user custom field when creating a new node of a specific type

title just saying everything :) I need to a Rule that sets a value of users custom field (ex. field_custom) WHEN a new node of type (ex. page) is created/saved. For me it looks like I can only access ...
-1
votes
0answers
13 views

Only add to cart if user has enough credits

I've a site where transactions are based purely on credits. No actual money is exchanged. In such a case, I want to restrict users from adding products to cart if they do not have credits to do so. ...
0
votes
1answer
23 views

How to make role field on approval in the Edit Profile page by Admin

This website has over 1000 users with different profiles. Each user choose their profile on registration. On their Edit Profile page, the authenticated users can change or add more profiles to ...
0
votes
1answer
24 views

Update the author_uid for an entity registration

I'm looking to update the author_uid for an Entity Registration in Drupal 7 programatically. I want to replace all anonymous users with the UID of 0 with another UID lets say 2 upon saving the ...
0
votes
0answers
10 views

How to send an email to an Organic Group admin for every comment of their group?

Drupal 7.x Organic Groups / Rules 7.x-2.9 What is the best method to send an email to the 'Administrator Member' role of a group every time a comment is posted in their group? I am looking to ...
0
votes
0answers
26 views

Popup notifications and Rules

I am trying to have in some way a notifications showing up when a user add a comment or in my case, gave a review on the content. For example, once they review a Book, I want to have a notifications (...
0
votes
0answers
24 views

Checkbox field to change the privacy of a User Profile

Currently, all the user profiles in the website are private, which means the pages are accessible only to authenticated users. I would like to put an additional field to the Edit Profile page (like a ...
0
votes
0answers
15 views

Rules condition to filter on Entityform Type

I have 3 similar Entityform Types that I've created. I need to create a Reaction Rule that only operates on submissions of one particular Entityform Type. I thought "Entity is of bundle" or "Entity ...
0
votes
1answer
25 views

Disabling node editing after first node flagging

I use flagging for signing petitions. Petitions should be editable until the first signing (flagging) is done. Now I look for a solution to disable node edition after first signing. My first thought ...
0
votes
0answers
11 views

problem with commerce shipping and commerce flat rate

I've build quite a few drupal commerce shops, and never had a problem with shipping rates. But this time I do. Normally, when building a flat rate, in the action, I put 'Add a rate for a shipping ...
0
votes
0answers
10 views

VBO rules on CRM Core (not working with custom CRM fields set a data value)

I haven't gotten that deep into it yet, but I'm trying to set up a fairly simple CRM on D7 using CRM Core (along with all the suggested modules.) I've added some extra fields to the 'individual' ...
2
votes
1answer
18 views

Set a condition for one field to be unique in all the content types.

I am working with Drupal 8, and have a custom post type called: chapter. This content type is connected with a taxonomy term called: Book. Now, I have a field called: number, for specifying the ...
0
votes
2answers
44 views

Node creation button/ link

I'm new to Drupal 8. I need to let users to create new node of some content type by pressing a button or custom link. In Drupal 7 I could achieve this by Rules and Rules link modules but I can't ...
0
votes
0answers
11 views

Commerce rules not coming under workflow->rules->events

I am working in Drupal8 and trying to add rules for Drupal8 commerce. However, I am not getting events like "Before saving commerce-line-items", "before checkout" under reaction rule. How to add all ...
1
vote
1answer
20 views

Custom RulesAction context for ubercart order

I'm trying to write a custom RulesAction to perform an operation after an order status is updated. Basically, I want to perform this operation after checkout is complete (but this event doesn't exist ...
1
vote
1answer
31 views

Why do both Text- and Data comparison seem to not work in my Rules conditions?

I’m using Drupal 7.56, the Rules module 7.x-2.11, and CiviCRM 4.6.31. I've been using the Text comparison and Data comparison conditions. Using the Text comparison condition, the condition is always ...
0
votes
1answer
16 views

use taxonomy term for reservations how to prevent overlapping

I have a drupal site where reservations are available. We use fullcalendar module to visualize the room reservations. For a reservation the user needs to add a new content. The content uses taxonomy ...
0
votes
0answers
20 views

Copy value from user field to custom field in commerce customer profile

I try using this rule to copy a value from a field in the user account and paste it into a field in a customer profile in drupal commerce: { "rules_kopiera_fran_anvandarkonto" : { "LABEL" : "...
0
votes
0answers
38 views

How to copy the user account 'picture' , using Rules

Drupal 7, File Field Rules module. How can I select the 'picture' from a user's account, as a source to copy from? I am trying to copy it to another image field in the same user's image gallery. ...
0
votes
1answer
34 views

phone call Button

I am a newbies in Drupal, currently I use Drupal 7. I want to add one button into content type, to make the phone call when user click on this button. I use module Button Field + Rule, but I don't ...
0
votes
1answer
83 views

Why is Rules Action “Create Linked Drupal User Account” not working?

I’m using Drupal 7.56 and CiviCRM 4.6.31. I’ve been using Rules in Drupal to create a Drupal User Account linked to the CiviCRM contact created. But it's failing. I'm getting the following error: ...
0
votes
1answer
33 views

Creating products with Rules and calculating price in Drupal Commerce

I am creating products on the fly with Rules, using Drupal Commerce. After user clicks on checkbox near product (additional service to product), I need to "add the service" to cart. Service is always ...
0
votes
0answers
30 views

Rules, Flags, Follower and New Content Notification

I am trying to setup a couple of rules. So far I have messed with rules some but since I am new, haven't had any success. This is what I am trying to achieve. Have created a user flag called FOLLOW. ...
0
votes
1answer
41 views

Follow content updates using flag and rules

I created a flag called flag-follow for nodes and a rule when a user reads a node is has interest in and wants to follow the activity of this specific content. He clicks on a "Follow" button. So far, ...
0
votes
0answers
35 views

Drupal Commerce Subscription rules

I am working on a Drupal 8.5 with Commerce 2, where I have already installed the subscription and Recurring module for Commerce. I have managed to set up the products and all the required settings ...
1
vote
0answers
14 views

Read opengraph property and use as field title

I have a simple site that generates an article content in the page. This content is a link preview of the article URL. My goal is when an article is created I want to use metatag property sitename as ...
1
vote
2answers
74 views

Encode a line break in an HTML email sent by Rules?

I have a rule that sends out an email when a node gets edited in a certain way. The rule fills the body of the email with the value of a <textarea> field from the node that was updated. The ...
0
votes
0answers
19 views

Node type syntax in Rules

I would like to send a message in D8 after a node sends as well as a message on the website. The node type is: nascholingen So I have: Events: After saving new inhoud (rules_entity_insert:node) ...
0
votes
1answer
21 views

What configures Drupal to send emails on the create or update of an unpublished content? [closed]

My Drupal installation attempts to send emails to a number of users whenever I create or update content but do not publish it. But because sending email is not configured errors are generated. I don'...
0
votes
1answer
36 views

Event is not responding properly

I created 2 rules with the same action, which sends Drupal logs to the site. One is Content is created with the After saving new content (rules_entity_insert:node) event; the other one is Content is ...
0
votes
0answers
26 views

Is there any way to auto generate an entity reference (behind the scenes) using only the entity ID?

I'm looking for some help with my workflow on my Drupal 7 website... Currently: 2 user types ( user type 1: u1, user type 2: u2 ) u1 creates content u2 creates a product referencing u1's content u1 ...
0
votes
1answer
29 views

Rules to remove user from role on node publish

I have tried the following: Event: updating an existing content condition: NOT node-unchanged published remove user role (I'm stuck here) The last item is my problem. There is no user reference in ...
1
vote
2answers
109 views

How to build node title from field values on node save?

I have a content type 'supertest' with fields 'Category' and 'Section' (both are taxonomy terms reference, dropdowns). And every user has a 'Display name' custom field. And I need to update title of ...
1
vote
1answer
313 views

How do I Send a single mail with Rules and VBO?

I have a view of nodes that I edit with VBO. I filter this nodes by author. When I edit this nodes I send a mail to author with a rule but I have a problem when I edit more than one nodes with VBO. In ...
0
votes
1answer
15 views

RULES : How to redirect user to a page after login unless they're using the one-time-login-url?

I created a rule to redirect users to the front page after they login. It works fine The problem is when a user uses the link received on his email to choose a new password, or after clicking on ...
1
vote
1answer
27 views

Fetch Customer Profile from Line Items

In a webshop I’ve build I want to send individual e-mails to owners of a prodruct in the shop after a product is sold. To do this I got this as a solution: Send mail to product owner with Rules But ...
0
votes
0answers
13 views

Rules “Schedule component evaluation” not apply actions of component

I have the a Drupal site with enabled modules: Rules, Rules Scheduler Privatemsg & all submodules Date & all submodules Flag I created a content type "Event" with a date field (popup) and ...
0
votes
0answers
21 views

How do I add a new node as reference?

I want to know if the Rules module is able to add a new node as new instance to the entity referenced field of another node. Imagine we have two content types, Person and Book, where each person has ...
1
vote
1answer
27 views

Send mail to product owner with Rules

I have a Drupal 7 site running including Commerce. I'm asked to make the webshop work in a way that the mail send after completing payment is send to the product owner(s). So when creating a product ...
1
vote
1answer
24 views

Trigger on selected field change

So I have a Drupal 7 Workflow rule where an email is sent out when a select field on a comment is set to "Approved'. This works fine with the exception being if I then add an additional comment to ...
0
votes
2answers
24 views

Rule to deselect checkbox item?

I have a mailchimp subscription content type that add a user to the email list in mailchimp. It works great and adds them to the list. However, I want deselect that checkbox when they fill out a ...
0
votes
0answers
36 views

Rules not firing at user creation for non default language

I created a rule that delete a user when a profile field contains a particular, troll specific pattern. It works perfectly when registering with the default language (fr) as current. When registering ...
2
votes
1answer
33 views

How to stop users from flagging other users if they have a custom taxonomy term?

I'm working on a project where users vote other users using the Flag module. Each user has a department term reference field. I would like to stop a user from flagging another user if they have the ...