drush import is successful, but displays an error anyway

canuckistani - November 6, 2009 - 23:47
Project:Node Export
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

If I import several nodes via drush, I get this error:

3 of 3 nodes were imported. Some values may have been reset depending on Node Export's configuration
Problem found with the import file. Check the node types exist.

This is because it seems impossible for node_export_import to return anything but FALSE when processing an array of nodes. The last bit of that else case in 'node_export.module' reads:

<?php
 
if ($redirect) {
   
drupal_goto('admin/content/node');
  }
}
else {
//...
?>

I think all you need to do is return true after the if clause that calls drupal_goto:

Index: /xxxx/sites/all/modules/contrib/node_export/node_export.module
===================================================================
--- node_export.module (revision xxxx)
+++ node_export.module (working copy)
@@ -508,6 +508,7 @@
       if ($redirect) {
         drupal_goto('admin/content/node');
       }
+      return TRUE;
     }
     else {
       // We are importing a single node.

#1

canuckistani - November 6, 2009 - 23:58

patch against Drupal 6 CVS attached

AttachmentSize
node_export_array_import_ret_val.patch 579 bytes

#2

danielb - November 10, 2009 - 09:34
Status:active» fixed

Thank you very much, I have commited it. You drush users are awesome, supplying patches and stuff.

#3

System Message - November 24, 2009 - 09:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.