Skip to main content

Questions tagged [actions]

A specially written PHP callback whose parameters are configured through the web is, in Drupal terminology, an action.

Filter by
Sorted by
Tagged with
19 votes
3 answers
16k views

How to change a field value with a Rules Action?

I'm trying to set up a Rules Action that can change the value of a field. I created an Action Set with a data type of Node. When I go to create a Rules Action, I have access to every default Drupal ...
Joren's user avatar
  • 2,440
9 votes
4 answers
8k views

How do I Bulk Edit Fields or Taxonomy of Nodes?

I'm working on a site that needs bulk tagging on nodes. The D8 core View Bulk Operations Port is "simple" (https://www.drupal.org/node/1823572) and it doesn't have "modify entity values" which I used ...
Aidan Foster's user avatar
7 votes
3 answers
849 views

Is there a way to trigger an action on a php exception in Drupal 7?

Whenever a php error/exception occurs, I'd like to log the error and optionally send an email off to the site admin. Is there an easy way to do this with Drupal 7? Maybe an existing module or a ...
lkiss80's user avatar
  • 473
5 votes
1 answer
3k views

Pass an argument to a Rules Action using VBO

If I create a Rules Action to set the value of a CCK field, and point to that action from VBO, is there a way to add user inputs to the VBO form on the views page to pass parameters to the Rules ...
Joren's user avatar
  • 2,440
5 votes
1 answer
5k views

How to create custom rules action event conditions?

Is there any universal formula or module to create custom rules actions, events and conditions? So that I just have to replace the required values and rest of the code remains the same. I searched, ...
Umair's user avatar
  • 441
5 votes
1 answer
244 views

Emails sent by actions not using html email formatting

I have the HTML email module and it is working for most site emails, however those that are called by actions/triggers don't use the template. How I can I force this behaviour?
Damon's user avatar
  • 821
4 votes
5 answers
9k views

New action for Views Bulk Operations

I'm trying to add some custom actions to my Views Bulk Operations, but for some reason, they don't appear in the list. This is my code (got it from Drupal.org, so I guess this is a working code...) ...
Michiel's user avatar
  • 1,567
4 votes
1 answer
196 views

How can I access profile fields with a % variable in Drupal Actions?

I have an action setup in drupal to e-mail me when a new user registers for the site. Right now it is only telling me their user name (%username). Is there a variable that can access added fields so I ...
Rob Mosher's user avatar
4 votes
1 answer
2k views

Add a custom action on admin content page

I want to add a custom action to the dropdown on the admin content page (/admin/content) as shown in the screenshot below using Drupal 9. The views module is enabled so that form is part of the view. ...
Felix Eve's user avatar
  • 6,283
4 votes
1 answer
566 views

Drupal Rules: How do I check if node is updated via edit form or via VBO?

I'm trying to build a reaction rule that fires on the event After updating existing content, but with the condition to only run after the node has been manually updated using the node edit form, not ...
gazorp's user avatar
  • 41
3 votes
3 answers
5k views

How to create custom VBO action?

I need to update term references on nodes without updating the "changed" timestamp on the node. If I use VBO with "modify entity values" as action I can update the term reference but it will also ...
uwe's user avatar
  • 12k
3 votes
1 answer
3k views

Programmatically trigger rules action component

I have some problem in triggering an action component. I tryed to call it from the module function and from the devel/php page. This is my component settings As you can see I have one node argument ...
Shyghar's user avatar
  • 1,084
3 votes
1 answer
761 views

Execute actions (actions module not rules module) programatically

How can an action from the actions module be executed programatically? In D7 there was actions_do() but in D8 actions are plugins or configuration entities according to https://www.drupal.org/node/...
Sebastian's user avatar
3 votes
2 answers
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 ...
PartySoft's user avatar
  • 1,046
3 votes
1 answer
1k views

custom action plugin with ConfigurationForm

I am trying to create a custom action with Configuration Form Field . I am able to create Action and it is being displayed on content page ( /admin/content ) , but I am not able to find the path to ...
miststudent2011's user avatar
3 votes
1 answer
3k views

Give permissions to a non-admin user for custom rules components [duplicate]

I have a view, format: table; and a few fields: Bulk operations: Content Content: Title Content: Price Content: Stock 1 (Stock 1) Content: Stock 2 (Stock 2) Content: Stock 3 (Stock 3) Global: Math ...
Ionut Adrian Luchian's user avatar
3 votes
4 answers
2k views

Is it possible to select all results in Views bulk actions form?

By all results I mean even those that are not displayed on the current page(if there is paging).
user avatar
3 votes
3 answers
379 views

Action to be triggered on Comment Approval

How can add new rule to trigger when a comment approve, in Drupal 7?
Fasal's user avatar
  • 43
3 votes
1 answer
66 views

Trigger a rule when a module update is available

It would be terrific to have Rules integration for when the Update Manager module finds an update. Is there a way to do this? Potential ways I'd use this would be to have an update page, customized ...
Josh's user avatar
  • 33
3 votes
1 answer
903 views

How to create a custom event in rules?

I need to create an custom event for an action to be triggered in the Rules module. Custom event is after completing the checkout process the page will be redirected to confirmation page. I need to ...
user3686276's user avatar
3 votes
1 answer
534 views

What does 'set breadcrumb' do in Rules?

One of the actions that comes with the Rules module is 'set breadcrumb'. When trigger this action, however, nothing seems to happen to the breadcrumb. What is supposed to happen? Does it set the ...
beth's user avatar
  • 9,087
3 votes
3 answers
2k views

How can I create a Drupal/IFTTT trigger or action?

I am looking into the service IFTTT ("IF This Then That"), which is like a trigger/action for the internet. For example, I could tell it that IF I post a new image to flikr, THEN post a link to it on ...
mtro's user avatar
  • 982
3 votes
1 answer
691 views

How can I trigger a Drupal Core action without writing any PHP code?

On my D8 site I have configured an action of type "Send email" using the Drupal Core "Actions" module (module can be installed under "Administration > Extend"). I want this Drupal Core action to ...
herzbube's user avatar
  • 225
3 votes
1 answer
101 views

How to troubleshoot my VBO operation which freezes at 50% every time?

I have written custom code that creates a new action for Views Bulk Operations (VBO). I am trying to run the action and it gets stuck at "Prepared 46748 out of 46766". If I run the same action with ...
Josh's user avatar
  • 215
3 votes
1 answer
638 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 ...
Andrés Chandía's user avatar
3 votes
2 answers
403 views

How to pass data from a Rules Action to a subsequent Rules Action?

How I can add actions in the Rules module in which they have a relationship with each other sequentially. I mean a 1st Rules Action sequentially passes data to a next Rules Action and in that next ...
Lê Quang Tú's user avatar
2 votes
3 answers
3k views

Operations bulk form for custom content entity

There is a custom entity called organisation. I am trying to build a view to allow bulk delete of the entities. I checked the view for display content and there is a field to display the checkbox(...
Shriram Shrikumar's user avatar
2 votes
3 answers
2k views

On node view page show a link or button that executes an action?

The closest that comes to this for D5: http://drupal.org/project/node_operations_block I am familiar with creating VBO Actions, but not sure how to create it for a node operation. Such as a link or a ...
giorgio79's user avatar
  • 4,651
2 votes
3 answers
3k views

What is the actions table for and can I delete orphaned actions?

I just ran $ drush cc all -v and it tells me I have orphaned actions. I'm curious to what the actions table is for in Drupal 7 and if it's safe to just drop all the data in the actions table?
Patoshi パトシ's user avatar
2 votes
2 answers
2k views

Trigger an action programmatically

I have defined an action and want to trigger it from a hook. We do not want to use the Rules module, because it is still buggy with Drupal 8. So, we cannot use rules_invoke_component(). What is the ...
Philipp Zedler's user avatar
2 votes
2 answers
4k views

What are Hooks, Actions and Triggers in basic terms

In basic terms what are hooks,actions and triggers. My ideas are that hooks allow you to do something when an event takes place and that the "something" is the action. I am having a bit of trouble ...
mintuz's user avatar
  • 109
2 votes
1 answer
2k views

Module that provides Rules action to create node?

Is an Action to create a node available in any module? I tried searching but couldn't find it. I was hoping something as basic as a node create action would be available.
radj's user avatar
  • 1,011
2 votes
1 answer
1k views

Drupal Commerce Rules & Custom Actions

When the checkout process is complete I'd like to record the SKU and the user ID in a separate table in my database. Is the best approach to use the Rules module, using the 'Completing the checkout ...
Adam Nuttall's user avatar
2 votes
3 answers
390 views

Actions - What are objects and context

Can somebody explain to me what the difference is between an object and context within the advanced action setup please. I understand what an object is but am failing to understand what context is. ...
mintuz's user avatar
  • 109
2 votes
1 answer
616 views

I can't see custom action

I am trying to create a custom action for bulk operations on commerce orders. I am using the following code. mymodule/src/Plugin/Action/DeleteOrderAndApps.php namespace Drupal\mymodule\Plugin\Action; ...
liquidcms's user avatar
  • 1,338
2 votes
2 answers
506 views

Get the user id for triggers when deleting a user

I have a script that sets up a specific url for a user when they register on a site, There are no real issues at the moment, but I need to cater for those 'unlikely things to happen that happen 20 ...
JimmyBorofan's user avatar
2 votes
1 answer
177 views

How to display a form filled by a VBO-submission?

I'd like to use Privatemsg module to send messages to group of users. For this purpose I plan to use a view with Views Bulk Operations (VBO) and plenty of exposed filters. I was able to create a ...
StG's user avatar
  • 302
2 votes
2 answers
486 views

Can I use Views Bulk Operations or something similar to create an archive of files generated by Views data export?

Using Views Data Export, I have multiple CSV files generated/provided by several different displays. Rather than setting up something where the user clicks a "Download CSV" button corresponding to ...
hawkeye217's user avatar
2 votes
1 answer
4k views

Email all users when a new content is published in Drupal 7

I want to send email notifications whenever a new content is published in the site. It would be helpful if I can do it by Actions - using Actions & Triggers I can use token to mail a single user, ...
Shafiul's user avatar
  • 1,226
2 votes
1 answer
212 views

Display local actions only on nodes of given type

I have defined a local action in my_module.links.action.yml. I have defined, that it should be displayed on a single route appears_on: entity.node.canonical. - And it works fine. Now I try to achieve, ...
Joachim Feltkamp's user avatar
2 votes
1 answer
356 views

How to embed plugin configuration form elements into another form?

I have a form that lists entities and each of the entities has a checkbox. The form also contains a list of actions(Action plugin) that can be performed on selected entities as a select list. I would ...
user avatar
2 votes
2 answers
330 views

Act on date field value

I have a CT with a Date (Unix timestamp) field implemented. It represents the start date of an event. One simply question: Is there a way to compare somehow, this value with the current date() and ...
mchar's user avatar
  • 1,654
2 votes
1 answer
2k views

How to perform a REST request after a node created using rules?

I have a backend service written by Python, which is exposed a JSON api. And I want drupal to perform an HTTP POST/PUT/PATCH/DELETE... request with json data (which is an output of a node) to the ...
clark's user avatar
  • 89
2 votes
2 answers
2k views

How to trigger an Action on an Entity from a button in a Views row (without VBO)?

I know actions can be done with Views Bulk Operations (VBO), but I just want a button in each row of a view of entities. When I press the button, the action is executed for that entity.
Joe Beuckman's user avatar
  • 1,111
2 votes
1 answer
1k views

How to prevent a Rules Action to happens twice using Rules Event User account validated?

I've set up a rule that sends you an HTML email when you activate your account. It seems to throw back a notification about: Notice: Undefined variable: attachment in SmtpMailSystem->mail() But it ...
Andrew Morris's user avatar
2 votes
1 answer
909 views

Regarding flag actions and rules integration

I am using flags by the Flag module. I added two action on that flag through Flag actions: The first one is to send an email to the site admin whenever the node is flagged. The second is to do a Page ...
why's user avatar
  • 1,147
2 votes
1 answer
405 views

Schedule change of field

Rules does not allow data selection of fields without first knowing the node type actually has said field. Rules only allows you to schedule components. Rules action components can't have conditions ...
J V's user avatar
  • 33
2 votes
1 answer
164 views

Why are only a few actions available on my triggers page?

I'm customising the content publishing flow of my site using actions and triggers. Unfortunately I've got a problem that not all the actions are show on the triggers page. For example on I have: ["...
user1004005's user avatar
2 votes
1 answer
162 views

View field with link to excecute action plugin

How can one add a field in views with a link to a custom Action plugin? With bulk operations it's possible to create a checkbox to perform an action to a set of results. My actions have an access ...
mpp's user avatar
  • 401
2 votes
0 answers
70 views

Custom action SQL update not executing?

I created a custom VBO action to change a value in the selected item. I have the button displayed as "hide item". When I activate it on the item it doesn't seem to fire and change the value at all. I ...
Patoshi パトシ's user avatar