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.



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:

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.


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’s picture

Status: Reviewed & tested by the community » Closed (fixed)