When running via drush with the "Batched export" mode enabled the process gets caught in a loop. Running drush with --debug has the following warning that repeats:

WD php: Notice: Undefined index: drush_batch_process_finished in _drush_backend_batch_process() (line 61 of /home/webuser/bin/drush/commands/core/drupal/batch_7.inc).

Trying to run the same query with "Batched export" turned off and I get the following with an empty file:

<?xml version="1.0" encoding="UTF-8" ?>

WD php: Warning: Cannot modify header information - headers already sent by (output started at [warning]
/home/webuser/web/sites/all/modules/views/plugins/views_plugin_display_feed.inc:41) in drupal_send_headers() (line 1043 of /home/webuser/web/includes/bootstrap.inc). [0.55
sec, 63.99 MB]
WD php: Warning: Cannot modify header information - headers already sent by (output started at [warning]
/home/webuser/web/sites/all/modules/views/plugins/views_plugin_display_feed.inc:41) in drupal_send_headers() (line 1043 of /home/webuser/web/includes/bootstrap.inc). [0.56
sec, 64 MB]
<?xml version="1.0" encoding="UTF-8" ?>

Comments

hoZt’s picture

Has anyone been able to get this to work with Drush? My problem might be related to the error when trying to create the temp directory: #981188: If system temp directory isn't writable, views_plugin_display directory is never created

darrylh’s picture

I'm getting the same problem when running in batched mode. The warning notice can be fixed with the patch from comment 13 of #950378: Undefined index: drush_batch_process_finished, but this doesn't stop the endless loop.

Additionally, if I run in non-batched mode, the export works, but it prints out the result set twice.

darrylh’s picture

Ok, upgrading to drush 4.5 fixes the doubled up output.

johnv’s picture

Still getting the following error 3 times, when generating a Views Data Export (batch-export=No) with drush 5.0 (generating correct output):

Warning: Cannot modify header information - headers already sent by (output started at .../sites/all/modules/views/plugins/views_plugin_display_feed.inc:41) in drupal_send_headers() (line 1216 of .../includes/bootstrap.inc).

And when I set Batch = Yes, it will throw me this error:
Notice: Undefined index: drush_batch_process_finished in _drush_backend_batch_process() (line 61 of /usr/local/drush/commands/core/drupal/batch_7.inc).

whthat’s picture

Confirming Darrylh #3 - Upgrading from Drush 4.4 to 4.5 or 5.0 resolves the process loop. The command clearly exits and process ends when run at the console or in cron. I did am not familiar with of the header issue though (sry johnv)

Steven Jones’s picture

Version:7.x-3.x-dev» 6.x-2.x-dev
Status:Active» Patch (to be ported)

This is a bug in Drush 4 which we can workaround, which I've done in 7.x-3.x

johnv’s picture

As reported by OP and by me in #4, the following warnings appeared: "Warning: Cannot modify header information - headers already sent"
My D7-installation uses Drush 5.0.
The committed patch in #6 makes the errors go away. Thanks!

Steven Jones’s picture

Status:Patch (to be ported)» Fixed

This was already committed to 6.x-2.x.

Status:Fixed» Closed (fixed)

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