After installing node_export the VBO action was not showing even though there was a hook_action_info() call. In looking at the code I noticed a small error on line 264 where it checks the selected formats. Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joel_osc’s picture

Here is a one liner patch.

joel_osc’s picture

Status: Active » Needs review

Setting to needs review.

lauranwv’s picture

Having same issue, Joel. I'm a developer plebeian. Could you please provide some specifics as to which module file this patch should be pasted into? It's not apparent to me.

joel_osc’s picture

The patch file is good for providing this info:

diff --git a/node_export.module b/node_export.module
index 8bdadb9..dca1708 100755
--- a/node_export.module
+++ b/node_export.module
@@ -261,7 +261,7 @@ function node_export_action_info() {
     $selected_formats = variable_get('node_export_format', array('drupal'));
     $format_handlers = node_export_format_handlers();
     foreach ($format_handlers as $format_handler => $format) {
-      if (!empty($selected_formats[$format_handler])) {
+      if (in_array($format_handler, $selected_formats)) {
          // @todo: should formats be able to define their own actions?
          if (!empty($format['#file']) && is_file($format['#file'])) {
            require_once $format['#file'];

This patch file indicates the node_export.module file is the one requiring patching and then shows the one line which was removed (-) and then the line which was added (+) in its place. You can go here to see how to apply a patch: http://drupal.org/patch/apply.

You may need to flush caches after this is done, then re-edit your view and the action should now be available in the Bulk Operations field. If you don't know how to flush caches I would install the devel module - it is most helpful.

Cheers.

bjcullinan’s picture

Issue summary: View changes

This is a perfect example of why Drupal is the most awful software ever. Why isn't this patch implemented in the latest version?

rossb89’s picture

Just ran into this issue myself, patch applies cleanly against latest version, and solves the issue.

rossb89’s picture

Status: Needs review » Reviewed & tested by the community
joel_osc’s picture

Just an FYI if anyone else runs into this... you need the 3.x-dev version which is not shown on the project page. Just use: "drush dl node_export-3.x-dev" and then apply the patch. It would be great if this could get committed and a new rev of node_export released.

MmMnRr’s picture

Hi everyone,
I had the same issue and I solved it by saving the "admin/config/content/node_export" preferences with the "Drupal var export" option checked. Although this option is checked by default, it seems that VBO action only appears when we force to save the Node Export preferences.
After saving, I reconfigured my view and then added the corresponding VBO field.
I used the node_export-7.x-3.0 version.

I also had to apply patch from this issue (comment #33) in order to make VBO Node Export Action to work. This VBO Action did not work for large amounts of data (nodes).

SchwebDesign’s picture

the patch #1 as well as comment #9 worked for me as well!!
please commit this?

  • danielb committed e88e438 on 7.x-3.x authored by joel_osc
    Issue #2023303 by joel_osc: VBO action not showing
    
danielb’s picture

Status: Reviewed & tested by the community » Closed (fixed)
AnticoVeneziano’s picture

comment #9 worked fine WITHOUT apply the patch.

petednz’s picture

Hoping someone here can give me a nudge in the right direction. Site has latest Drupal 7, Node Export, Views and VBO.

I have 'saved' the Node Export config page as suggested even though vars was the selected option.

In the 'configure field: Bulk Operations' I can see and select "Node export (Drupal var export)"

But once the view is saved there is no action for Node Export under Operations.

Site is running Domain and a lot of other modules so it could be some conflict.

I have flushed caches, brewed tea, googled further, still stuck. Appreciate any pointers

joel_osc’s picture

Have you tried enabling devel and placing a dpm at the line of code prior to the 'if' statement referred to in this patch? At least this would tell you if it is the same problem or a new one. Cheers.

luke.stewart’s picture

I don't think this is due to this problem. Control is passing into the if statement.
The function is returning an array with five elements each of which take the form of below.

node_export_json_action (Array, 6 elements)
    type (String, 4 characters ) node
    label (String, 18 characters ) Node export (JSON)
    behavior (Array, 1 element)
        0 (String, 16 characters ) changes_property
    configurable (Boolean) FALSE
    vbo_configurable (Boolean) TRUE
    triggers (Array, 1 element)
        0 (String, 3 characters ) any