Questions related to Drupal actions. Action is a specially written PHP function whose parameters are configured through the web.

learn more… | top users | synonyms

0
votes
1answer
14 views

rules does not have any action for publish seleccted content

In admin/content page we have some update options. I want to execute a php code only when I use 'publish selected content' or 'unpublish selected content' on that page. This rules should be fired ...
1
vote
1answer
45 views

How to use tokens in data selectors in Rules and how to get autocomplete to work?

In Drupal 7, the Rules module was quite simple to use. You create a rule, define it's action and done. In Drupal 8 version of Rules however, i.e the alfa1 version (which is what I'm using), I see some ...
1
vote
0answers
10 views

VBO calls entity_save after custom action is triggered. How to stop that?

I have VBO custom actions defined and it gets triggered. Also, I do NOT have 'behavior' => array('changes_property') defined in my hook_actions_info() as described in How to create custom VBO action? ...
0
votes
1answer
27 views

Rules event is not triggering

I've created a custom action to fire when the "checkout is complete" event occurs. The front end is a mobile application, where as the back end is Drupal. So I create an order using its API and update ...
0
votes
2answers
36 views

Different ways of logging in a user without having them to type anything?

I'm on Drupal 8 and currently looking to replicate similar functionality like: https://www.drupal.org/project/urllogin -- They do not have a D8 version yet. I need to auto login a specific user ...
0
votes
0answers
15 views

Alter action label

We have the action system.action.user_unblock_user_action. langcode: en status: true dependencies: module: - user id: user_unblock_user_action label: 'Unblock the selected user(s)' type: user ...
1
vote
1answer
22 views

How to create a Privatemsg thread with multiple recipients in a Rules component?

I'd like to send private messages to a selected group of users. For this purpose I use a view with VBO and a Rules component action (utilizing the "Send message" action provided by Privatemsg) - as ...
2
votes
1answer
37 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 ...
3
votes
1answer
64 views

How to automatically modify a field after saving content?

I have posted this question on drupal.org, but I realized that the thread is more than five years old. So I reproduce here the question made there: field modification triggered by saving action I ...
1
vote
0answers
12 views

Cache Actions Cache Homepage on Flag

I have a flag set in a rule to cache my site when it is selected. I need to only cache the homepage. There is not an option using the Cache Actions module to point to the homepage. Any ideas?
0
votes
0answers
29 views

Custom Drupal action is not triggered

I recently updated my VBO module from 7.x-3.0 to 7.x-3.3. I have 2 custom modules that implement hook_action_info(), which is getting invoked in one module but not the other one. Both modules are ...
0
votes
0answers
27 views

Is it possible to create an action with derivatives?

Is it possible to create an action in Drupal 8 and point it at a deriver class to generate them automatically? For example with Custom Publishing Options I have a ConfigurableActionBase action that ...
1
vote
0answers
20 views

Define permissions for Actions?

function custom_mod_action_info() { return array( 'custom_mod_delete_user_cats' => array( 'label' => t('Delete a users cats'), 'type' => 'user', 'configurable' => ...
0
votes
0answers
29 views

Passing custom object through the Rules and SOAP Web Services

I deal with SOAP client, to send some Commerce Order info, after succesfull payment. I am at the point where I need to send an object with test data: $customerInfo = new stdClass(); $customerInfo-&...
2
votes
1answer
96 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 ...
1
vote
0answers
62 views

VBO custom action and submit functions from my module don't get called

I am trying to make my custom action for View Bulk Operations. My action works up to the point where I submit the form specified in assign_to_action_form. The watchdog statement in that function get's ...
2
votes
0answers
42 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 ...
1
vote
0answers
65 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 ...
2
votes
1answer
36 views

Multi action in rules drupal 7

How I can add actions in the rules in which they have a relationship with each sequentially. I mean Action sequentially pass data to next action and in next action I can use passed data from previous ...
0
votes
0answers
32 views

Cannot display icons in Buttons of EntityForms Using Bootstrap theme

I am using bootstrap theme version 7.x-3.1-beta2+65-dev and Entity Forms. Bootstraps lets us change the icon of form buttons and its color using hooks. But the buttons in EntityForm does not have ...
0
votes
0answers
100 views

Download a file from a VBO Action

I am trying to create an action for Views Bulk Operations (VBO) that allows a user to export a bunch of (biblio) nodes from a view as bibTEX file. I have the following module defined. It works, except ...
2
votes
1answer
52 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 ...
0
votes
0answers
170 views

Why cURL not sending my data to salesforce?

I am using drupal form to build a contact us form. I want to send my contact us data to salesforce. My contact us form has action "https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-...
1
vote
1answer
46 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 ...
2
votes
1answer
269 views

How do I Bulk Edit Fields or Taxonomy of Nodes in Drupal 8?

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 ...
0
votes
1answer
135 views

Imagecache Custom Actions - Imagemagick

I cannot get my imagecache custom actions to work at all? When returning $image in any way, it gives me an error, which can be resolved by adding in the first line here: if (!$image_context['entity']...
0
votes
1answer
207 views

VBO Pass Argument to Custom Action Function

I have a view that list entities. It has a VBO field on it for executing a few custom actions. I can get the actions working, but I need to add a field to the operations form on the view which lets ...
0
votes
1answer
67 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 ...
0
votes
1answer
125 views

Run a view's bulk operation immediately but in background. Is that possible?

Is it possible to run a view's bulk operation immediately after pressing the button but in the background (in other words, without forcing the user to wait until the progress bar completes to 100%)? ...
0
votes
1answer
319 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 ...
0
votes
1answer
120 views

Perform action on logout,

I would like to add javascript on logout. I tried using hook_user_logout but the javascript doesn't get added. Even adding something as simple as drupal_set_message doesn't result in a message ...
0
votes
1answer
135 views

Pop-up for view bulk operation?

Normally View Bulk Operation (VBO) will lead to separate page for asking details and performing actions. Is there any module readily available to show pop-up for views bulk operations. Searches did ...
0
votes
0answers
86 views

Adding a custom vbo action in drupal 6

function custom_profile_action_info() { return array( 'custom_profile_mail_action' => array( 'type' => 'system', 'description' => t('Custom Send Mail'), 'configurable' =&...
0
votes
1answer
140 views

How to use hook_rules_action_info_alter

I am running Drupal Commerce, and I want to modify the message it prints out when an item is added to the cart. I found that the commerce_cart_rules_action_info() function implements the ...
0
votes
1answer
465 views

Returning a variable from a rules action

I am trying to create a variation on Fetch Entity, and I'm having trouble returning an entity. I'm just grabbing the data using db_query, and trying to return an array of nodes that are loaded, but ...
0
votes
1answer
349 views

Permission Issue with created actions and VBO

I’ve created a new action in a custom module using hook_action_info() /** * Implementation of hook_action_info(). */ function recruiteractions_action_info() { return array( '...
0
votes
2answers
88 views

“Send email” action not working to send email to poster of comment

I have successfully set up email notifications on my client's blog for administrators when new comments are posted and am now trying to set it up to send a thank-you email to the poster of the comment ...
1
vote
1answer
412 views

Returning an entity from a custom Rules action

I'm new to writing modules and back end dev. I'm trying to write a custom Rules action that takes a list and returns one item from that list to use as a relationship end point. I've declared the rule ...
0
votes
1answer
479 views

Is there a way to pass a form #value to the form #action in Drupal 7 form API?

In the example below I want to take elements from the form and include them as part of the URL that I am submitting the form (using #action) so the submitted URL would look like http://example.com/...
1
vote
1answer
46 views

It is possible to have an action for the condition rules?

I have several conditions that are called in rules_condition_info () and wanted to have an action for each, for whenever a function returns true, it is called an action. I know it's probably possible, ...
0
votes
1answer
61 views

when a button_field is presses, how do I access the node that owns the button?

I have a button (button_field) on a content type which is rendered by a view. The view will display a list of items and each will have a clickable button. When the user clicks a button, I need write ...
1
vote
1answer
17 views

Notify site users based on user account field (e.g. apt number)

I run a site for my condo, the HOA wants to setup a way to notify residents when they get a package, that needs to get picked up from the office. In the users account settings their are both unit ...
1
vote
1answer
223 views

D7 : Create an Action on 'node_insert' or 'node_presave'

I created a new action on a new node being created, it shows up in my triggers and the action gets triggered. Works so far. Problem is trying to add additional functionality using some submitted field ...
0
votes
1answer
198 views

Flags: get Action after a user flagged a specific number of nodes?

I would like the users of my site to choose a specific number of nodes. After this they should see, to which taxonomy term these nodes belong to. I have already found the flag module as well as flag ...
0
votes
1answer
134 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).
1
vote
2answers
115 views

Custom action to create a new entity based on a fields of an existing entity

There are two entity types on my site: 1) an application for participation (entityform) and 2) a participant profile (node). At first user creates an application for participation. And then site ...
1
vote
1answer
552 views

Rules: how to create variable with PHP and $_SERVER['HTTP_REFERRER']

I want to parse the query string off the HTTP_REFERRER and make that available as a variable for actions to use. I feel like one of these options should let me do that, but I can't be sure... ...
2
votes
1answer
1k 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 ...
1
vote
1answer
954 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 ...
0
votes
1answer
60 views

how to create a new node of a content type when a new node created of another content type?

my problem is : I have a content type called job posting, every job post will associated with a test set that every candidate should write to get qualified for that job i.e., when I create a node of ...