I'm using D6.14 and VBO 6x 1.8 (10 Sep 2009) with the latest Views. I'm trying to delete 100+ nodes created in CCK having as sole "extra" field a "Meeting No." consisting of an integer in a text field. I think I'm following the instructions. The Live Preview displays my nodes correctly, and under the "BULK OPERATIONS" heading there is a "Delete node" button. (There is no 'Check all' checkbox.) When I check a node and click the "Delete node" button, there is no request for confirmation, and no report afterward of an action performed. The verbose SQL statement that shows below the Preview is a Select statement and does not contain a Delete command; it reads:
"SELECT node.nid AS nid, node_data_field_mtgid.field_mtgid_value AS node_data_field_mtgid_field_mtgid_value, node.type AS node_type, node.vid AS node_vid FROM node node LEFT JOIN content_type_meeting node_data_field_mtgid ON node.vid = node_data_field_mtgid.vid WHERE node_data_field_mtgid.field_mtgid_value IS NOT NULL"
My settings are:
Name: Page
Title: None
Style: Bulk Operations
Use Ajax: No
Pager: yes
Items per page: Unrestricted
Distinct: No
Access: Unrestricted
Caching: None
Exposed ..: No
Header: None
Footer: None
Empty text: None
Theme: Information
Path: node/126
Menu: No Menu
Relationships: None defined
Arguments: None
Fields: Content:Meeting 9999
Sort: None
Filters: Content: Meeting not empty

Page:Style Options
Field: Meeting Number
...
To execute operations: invoke directly
Display operations as: each action as a separate button
Hide select all checkbox: unchecked
Skip confirmation step: unchecked
Display processing result: checked
Merge single action's form with node selection view: unchecked

Selected operations:
Delete node checked, all others unchecked

Context menu:
Enable context menu: unchecked
Hide operations form: unchecked

Not sure if this is a bug (similar to previously reported bugs in 5x) or if I'm pushing the wrong button somewhere. This is an important module and I need to get it working. Thank you for your efforts.

Comments

infojunkie’s picture

Did you try to execute the operation on the view page, instead of the preview? If I'm reading your view dump correctly, the page should be at node/126. VBO is designed to work on view pages and hasn't been tested on page previews.

manicolaus’s picture

AAAh! Now I get it. Thank you! Now it works!

OK, maybe I can contribute a little here in the way of documentation? Namely:

How to Use Views Bulk Operations

You need to obtain, upload, and enable the Views module and then the Views Bulk Operations (VBO) module. Instructions on how to perform these initial steps are elsewhere.

When that is done, and you are still logged on to your site as Administrator, navigate to the Create Content menu and create a new page. Give the page a title that reflects the operation you want to perform; for example "Delete Old Nodes." Leave the Body blank. Leave all the other settings alone except the Publishing options; there, uncheck all the boxes. Save the page and make a note of its node number showing in the address bar at the top of the browser (for example: "http://mysite.com/?q=node/128" -- the node number is 128. You, the administrator, are going to need this page because VBO performs its operations only on content that is displayed on a page. But your site users don't need to see this page, so it needn't be published.

Now you are ready to set up your VBO operation.

Navigate to the Views module (Administer | Site Building | Views).

In Views, there is a set of horizontal tabs across the top. Click the second tab, "Add."

In the page that appears, the first text box is "View name:" This is required. Give the new view a name that will remind you of the bulk operation you want to perform. For example, if you want to delete a bunch of old nodes, call it "bulk_delete_old_nodes." This field is for the program to read.

In "View description:" text box, enter a more descriptive text. For example, "Delete all nodes older than one year." This field is for users to read.

If you are going to eventually build several or many VBO operations, you can enter a short label in the "View tag:" text box that will sort the operations alphabetically. Leave it blank if you're just doing one or a few.

Next, in the "View type:" series of radio buttons, select the type of content on which you want to perform your bulk operation. Each of them has a subtitle of explanation. If you want to perform an operation on nodes, select "Node." If you want to perform an operation on users -- for example, to ban all users whose names begin with N -- select "User." And so on.

Then click the "Next" button at the bottom of the screen form. You will see that the row of tabs across the top of the form has changed. You are now in the "Edit" tab, and the title at the top should read "Edit view YourViewName." This screen form contains a lot of settings that are showing, plus a lot more that will appear as you proceed. Only a few of them are important. Namely:

On the left side of the Edit View form, under the word "Defaults," there is a list box that probably shows "Page" -- if it does not, click the selector button and select "Page" -- and under that there is a button "Add display." Click on "Add Display." When this takes effect, you will see that the word "Defaults" has dimmed and there is directly under it a bold label "Page." You will also see a set of pink warning messages near the bottom of the screen, advising that the display called "Page" uses fields and a path but none are defined.

Ignore the pink box for a moment and give your newly added Views display page a name. (This Views display "page" is really nothing more than a collection of Views settings. It is not the same as the content page you created at the outset.)

There is a subform in the center-right of the "Edit" screen form. Its top line is "? Page - Display the view as a page, with a URL and menu links" and at the right of the top line there is a button, "Remove display." In that subform there are three columns. The leftmost is titled "Basic settings." The first item is "Name: Page." Click on "Page" and in the text field that appears below, enter something that will help you find it again, such as "Bulk-Delete". Click the "Update" button below the text field, and when the gears stop whirring you'll see this name listed on the left side under the "Defaults" box. Whenever you're working with your settings, be sure that this View display page is the active one, and not the "Defaults" view page. The Views module has a way of defaulting to its "Defaults" view and one can easily enter settings in the wrong place if not careful.

Now pay attention to the pink warning box. To make it go away, you need to create a path and define some fields.

(a) Create a path. At the bottom of the "Basic Settings" column is a box titled "Page settings." Under "Page settings" there are two items: "Path: None" and "Menu: No menu." Click on "None."

A new small subform appears below, titled "? YourPageName: The menu path or URL of this view" with one text box. Here you must enter the address of the blank content page you created at the outset. For example, if you created your content page at node/128 then you enter "node/128". Click the "Update" button directly beneath the text field where you just entered the page address. Now one of the pink warning messages should go away, leaving only the warning message about not having any fields defined. Note that if you enter a path to a non-existent page, the pink warning message will also go away, but you'll run into a "Page not found" error much later down the road. If you enter a path to an existing page that has other content, there will be other problems. So get this right the first time.

(b) Define some fields. In order to know what records you want to operate on, you have to be able to see them. Therefore you must select at least one field by which you can recognize the records you want to act on.

The "Fields" selection box is at the bottom of the middle column of the three settings columns for your Page display. Click the + (Plus) sign to the right of the header bar. A new subform appears below, titled "Page: Add fields". It contains every built-in field as well as every new field you have defined with the Content Construction Kit (CCK). Select at least one field that will help you identify the records you want to work on. For example, "Node: Title" and "Node: Post Date." When done selecting, click the "Add" button at the bottom of this subform. Gears whirr and in a few moments, if you have done your job right, a "Live Preview" appears at the bottom of your screen. Scroll down to check that the content that is displayed allows you to identify the content you want to act on. So, in this example, the Live Preview should be a list that contains the title and the post date of every node on your site.

But hold on, you only want to kill the OLD nodes. Remember, the VBO module operates on the content that is displayed. If you were to set up a delete operation now (we'll show how, in a moment) you would delete every node on your site. So, before going further, you need to set up a filter that will show only your OLD nodes.

The Filter function is in the third column of your "Page" subform, underneath the button "Remove display." Click on the + (plus) button, and again a new subform appears below. It also lists all the fields in your site. Select the field (or fields) whose display you want to restrict (filter). In this example, you would select the "Node: Post date" checkbox -- the same as one of the fields you selected in the previous step. When done, click the "Add" button at the bottom of the subform. Yet another form appears in which you define the filter conditions.

The filter conditions are quite comprehensive and fairly self-explanatory. For filtering by date, for example, you can choose either a specific date or an offset from the current date. In this example, you could select an offset of "-1 year". When done, click the "Update" button at the bottom of this subform. Check your results in the Live Preview below. If it's not what you wanted, go back to the "Filters" box and click on the line containing the filter condition you just created. The filter conditions subform opens again and you can revise and update your filter until the Live Preview shows you exactly the set of records on which you want to operate.

When you have tailored your fields and filters to get the records you want, you're almost done. Now go back to the first of the three columns in your display page view and look under "Basic settings." (Be sure that you haven't accidentally switched to the "Defaults" display page view.) The third item down under "Basic Settings" is "Style." It will be set by default to "Unformatted." Click on "Unformatted." A new subform opens below, titled "? Page: How should this view be styled". Click on "Bulk Operations." Then click on "Update default display" at the bottom of this subform.

When the gears stop whirring, the "Style" line under "Basic Settings" reads "Style: Bulk Operations." Now click on the little gear icon to the right of "Bulk Operations." Another subform opens below. There you will see, first, the fields you previously selected to display, together with a set of options for modifying how they are grouped and displayed. You probably don't need to change any of that.

Next comes a set of option buttons "To execute operations" and "Display operations as". Try the "Invoke them directly" option under "to execute." Under "Display operations as," try "Each action as a separate button", check the "Display processing result" box and leave the other boxes unchecked.

The meat of the module comes under the "Selected operations:" subheading. Here you will see an awesome array of predefined bulk operations that you can perform with the click of a button. You can select one or many at the same time. In this example, where you want only to delete old nodes, click on the second checkbox, "Delete node ..." and leave the rest alone. Go down to the "Update default display" button and click it.

Your Live Preview at the bottom of the screen now will have changed. You'll see the same list of records as before, but each record will have a checkbox in front of it, and there'll be a box titled "Bulk operations" at the top, with (in this example) a "Delete node" button in it. (This display will vary depending on the options you selected just previously).

Now if you click on any of the checkboxes and click the "Delete node" button, gears will whir but nothing will happen. You will, if you're like me, suspect there is a bug somewhere and, after checking the comments queue, maybe post a support request. Whoa! Remember what I said at the outset: VBO only works on content that is displayed on a page. The "Live Preview" is not a page. It might be nice if VBO worked like PHPMyAdmin or another query builder, but that's not how it works. Sooo ... nice try with the Live Preview, but no cigar! Don't despair, though; success is just two small steps away.

First, find and click the "Save" button for the view. It's just above the words "Live preview" somewhere in the vertical middle of the screen, to the left. When the save operation finishes, you should see the legend "View 'Bulk-Delete'" (or whatever name you gave your view display settings page) near the upper right, under the tabs bar (and beneath the message "The view has been saved" if it shows).

Click on the words "View 'Bulk-Delete'" (or whatever name you gave it). You will be taken to the new page you set up at the beginning of this whole operation. (If not, you entered the wrong path. Go back and fix it.) On that page you will see a display of the fields you selected, as you filtered them, exactly as you saw them in Live Preview. Each has a check box in front. There is an unlabeled "select all" checkbox at the top next to the column headings; try it. Above that is the box labeled "Bulk operations" with your "Delete node" (or whatever you selected) button. NOW you can select some or all the records on which you want to operate. Click the button. (Be sure that you are still logged in as Admin, or you probably won't have permission to do this.) Gears whir, and a confirmation form appears "Are you sure?" (You can turn off the confirmation form in the Bulk Operations settings). Click the "Confirm" button, more gears whir, and a results message appears, and below that a listing of the records, if any are left, as they appear after your operation has been performed.

You're done.

You can go back into Views at any time, select the Views Display Page that contains your settings, and modify them as you wish.

The VBO module is a very powerful one with a multitude of uses for sites having a significant content base.

The preceding is based on Drupal 6.14 using Views 6.x-2.6 (2009-Jun-10) and VBO 6.X-1.8 (2009-Sep-10).

I hope this text is helpful to other users who, like me, are relatively new to Drupal and are still struggling up the learning curve.

infojunkie’s picture

Status: Active » Fixed

Thanks for your write-up. I'll try to reuse it for new users of Drupal.

manicolaus’s picture

YW

silentway’s picture

Bravo, great instructions. Very helpful to this new VBO user! Would be great if integrated into VBO help/Readme (on D.O and in built-in help/advanced help).

Perhaps divide into two parts: (1) New to Views and new to VBO? and (2) Experienced with Views but new to VBO?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

izmeez’s picture

EDIT - Sorry, I misunderstood the title of this issue to mean there was difficulty with bulk deleting rather than how to setup VBO. It seems to me that the VBO delete does work and does include a checkbox to select all.

wwwoliondorcom’s picture

Thank you, great post, and very useful.