When I tried to do a feed import, I got the following error.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=1726&op=do
StatusText: OK
ResponseText [Omitted text]

(There are quite a few similar errors on the web, for example https://www.drupal.org/node/1125060.)

When I changed the author field to 'site-admin' (see attached image), auto-complete seems running and popup the following error.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: http://site-prod.local/user/autocomplete
StatusText: OK
ResponseText: my_site_name | my_username

[Search form]
[Primary tab: View (active tab)]
[Broken links]
[Devel output]
[My username]
[Omitted text]

The log message is the following.

Warning: Cannot modify header information - headers already sent by (output started at /var/aegir/platforms/production/drupal-7.27/includes/common.inc:2700) in drupal_goto() (line 703 of /var/aegir/platforms/production/drupal-7.27/includes/common.inc).

If I put exit() right after drupal_json_output(). The related problem seems resolving itself.

When I run drush -d -v search-index, the indexing stuck at around 61%. This indicates some problems with a node.


  • Looks like the request returns something which isn't a feed. Does "lots of text" mean lots of HTML markup? You may be able to find out what the remote site is saying by reading through it. – Ollie May 21 '15 at 8:46
  • Actually, there is no markup (or is it stripped?), but text about google tag manger javascript code, some user info e.g. (Member for 2 years 6 months), following by the website menu links – kenpeter May 22 '15 at 2:36
  • @Ollie, also see my update at "Update for Main error 2015-05-22" and "Update for Related Error 2015-05-22" above – kenpeter May 22 '15 at 2:40
  • Ok but you should probably call drupal_exit() rather than exit(). What's happening is that Drupal is sending your json over to the page theming system, adding headers, footers etc. api.drupal.org/api/drupal/includes!common.inc/function/… – Ollie May 22 '15 at 8:39

By using xdebug and vdebug (plugin for vim), I am able to step into the code and ping point the issue.

In https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_cron_run/7

I put a watchdog: watchdog('bug_cron', '<pre>'. print_r($module, true). '</pre>'); inside.

// Iterate through the modules calling their cron handlers (if any):
foreach (module_implements('cron') as $module) {
      // Do not let an exception thrown by one module disturb another.
      try {
        // NOTE: put a watchdog and look at your log message. 
        // You should able to see which module causes issues.
        watchdog('bug_cron', '<pre>'. print_r($module, true). '</pre>');

        module_invoke($module, 'cron');
      catch (Exception $e) {
        watchdog_exception('cron', $e);

It is the search module causes issues. Disable it, then uninstall the setting via the drupal menu GUI, then it is fixed, but I am not sure why search module causes issues.

Updated at 2015-05-26

It turns out my module uses hook_url_inbound_alter + drupal_goto caused issues. It is not easy to debug, because there are couple of side effects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.