Actions in Views Bulk Operations

Views Bulk Operations come handy when doing bulk operations over a selected list. This is great because it combines the power of views to filter the selection and specific actions to do on each selected entity. For Ex: Updating some field in the record, deleting selected entity and so on.

Views also provide an easier way to define your own set of custom functions to perform on each selected row of entities.

First, we need to define an action :

Useful Drush Commands

Technologies: 

Log out all active Users:

drush sql-query 'TRUNCATE TABLE sessions;'

Download drupal and rename:
Downloads and renames to web

drush dl drupal --drupal-project-rename=web -y

Install Drupal database:
Installs drupal when executed inside the drupal folder.

Troubleshooting: Node Reference field always displaying 10 results when using the Advanced View option in Drupal 6

This problem particularly occurs when the views is upgraded to 3.x in Drupal 6. The nodereference field which gets list data from a view returns only 10 results irrespective of whatever is set on the views page.

There is an easy solution to alter by modifying the items_set_per_page using views hooks.

Fixing Issue: Fatal error: "Maximum execution time of 240 seconds exceeded"

Search for drupal_set_time_limit in Drupal directory and modify the line as below. Ensure that it is restored later once the required operation is over:
For example: Modify the following line in locale.inc file in includes/locale.inc.

<?php
drupal_set_time_limit
(240);
?>

and set to 1800.