Stack Exchange Network

Stack Exchange network consists of 175 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 [actions]

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

0
votes
1answer
78 views

Taxonomy Term Field of a Reference Field in a Product not available in Data Selector for CheckOut Rules

I installed Drupal Commerce Kickstart 2 with drupal version 7.54 and drupal commerce Version: 7.x-1.14. My problem is I want to send email to the store owner every time an order is completed. So in ...
0
votes
1answer
29 views

module to test if e-mail is working

In D7 I'm trying to determine the best way to periodically check if e-mail is working. I'm looking for a way to create a workflow that, say, on cron would check the day of the month, if it's the day ...
0
votes
1answer
135 views

How to get the selected items (with VBO) in the buildConfigurationForm of a custom Action

I have made a custom action which have a configuration form: class MyAction extends ConfigurableActionBase Thus, I have the opportunity to create a form that allows the user to set some options. ...
2
votes
1answer
165 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 ...
3
votes
1answer
399 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/...
1
vote
1answer
41 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 ...
1
vote
1answer
66 views

How do I create a custom action?

I want to create simple actions that will change the field_support_status field value to 1 or 0. I enabled the "Actions" module and created a custom module with my actions, but after the module is ...
0
votes
1answer
56 views

Actions module - redirect to url

I'm trying to learn about the functionality of this module, however I don't understand quite right what the Redirect to URL option means/does. Any hint in the right direction will be much appreciated.
3
votes
1answer
53 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 ...
1
vote
2answers
569 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 ...
0
votes
0answers
94 views

How to use tokens with actions module?

I'm trying to use core Actions module to send email after new comment has been inserted. I'm doing it with Action::load('<my_mail_action>')->execute([$entity]); executed with function ...
1
vote
0answers
102 views

How to set an action to unpublish content containing some particular keywords?

I just enabled action module provided by Drupal core. There in configuration, I have chosen CREATE AN ADVANCED ACTION, and then choose "unpublish content containing keywords". I have entered keywords ...
1
vote
1answer
192 views

How do I code to take action when a VBO (bulk action) is finished?

I've recently coded a few Drupal\x\Plugin\Action classes that respond nicely to my VBO (now bulk actions?) in Drupal 8. Now I'd like to implement a hook, or whatever is required, to take action when ...
1
vote
2answers
752 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(...
2
votes
1answer
891 views

Defining module.links.action.yml with route parameters

How can I pass dynamically route parameters to module.links.action.yml? My code of module.links.action.yml: module.group_apply: route_name: module.group_apply title: 'Subscribe to group' ...
1
vote
1answer
34 views

“Unable to send email” error shown to anonymous users in Workflow action

Using the Workflow module, I've got a content type that can be created by anonymous and authenticated users alike, then it goes into a review process. Upon creation, I want to email the user with a ...
0
votes
0answers
211 views

how to change node submit form text for all users?

I created the node type 'application',which can be added by any users and will be unpublished by default. I used hook_form_id_alter() to change the text of the submit button as below: function ...
0
votes
2answers
20 views

Using triggers to add new user to a mailing list

I would like the Mailman Integration module to add any new user to a mailing list. I enabled Triggers and created an action in PHP. I then assigned the action to execute when a new user is created. I ...
1
vote
1answer
371 views

Unable to change the author of content using views/action

I want to change the author of multiple nodes. I have set up a new action by going to /admin/config/system/actions and then selecting "CREATE AN ADVANCED ACTION" and then "Change the author of content....
1
vote
2answers
303 views

How can I produce a non-blocking process to modify newly created nodes of custom content type?

I have a custom content type called a Scan where the only required field is ISBN. Nodes of this type are created when a user POSTs to my REST API endpoint with an ISBN number. That's all working fine, ...
4
votes
1answer
3k 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, ...
0
votes
1answer
69 views

VBO action on pending node revision (using Revisioning) publishes the revision

I have a View listing pending node revisions (using Revisioning). I have several actions, like changing the node author, which are executed using Views Bulk Operations. Executing, for example, the "...
0
votes
2answers
30 views

Rules does not have any action for publish selected 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 unpublished selected content on that page. This rules should be fired JUST ...
1
vote
1answer
1k 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
2answers
96 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
53 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
1k 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 ...
1
vote
1answer
217 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
143 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
345 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
0answers
235 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
1answer
377 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' => ...
3
votes
1answer
765 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
279 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
64 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
145 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 ...
3
votes
2answers
274 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 ...
2
votes
2answers
219 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
337 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-...
2
votes
1answer
192 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 ...
7
votes
3answers
6k 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 ...
0
votes
1answer
216 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
411 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 ...
2
votes
2answers
258 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
245 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
588 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
416 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
215 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
118 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' =&...
-1
votes
1answer
952 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 ...