The anonymous role is redirected to another node. If this "rule" is enabled, drush 4.4 and 4.5 gives me the following error in cli:

% drush pm-list
Drush command terminated abnormally due to an unrecoverable error.                                                             [error]
[1]    2945 exit 1     drush pm-list

With debug option:

% drush -d pm-list
Bootstrap to phase 0. [0.03 sec, 1.7 MB]                             [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.04 sec, 1.83 MB] [bootstrap]
Bootstrap to phase 6. [0.1 sec, 5.58 MB]                                                                                       [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.1 sec, 5.58 MB]                                                      [bootstrap]
Initialized Drupal 7.7 root directory at /var/www/vhost/topicforge.net [0.12 sec, 6.54 MB]                                        [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.12 sec, 6.55 MB]                                                     [bootstrap]
Initialized Drupal site default at sites/default [0.12 sec, 6.55 MB]                                                              [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.13 sec, 6.55 MB]                                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.13 sec, 6.56 MB]                                                 [bootstrap]
Successfully connected to the Drupal database. [0.13 sec, 6.56 MB]                                                             [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.14 sec, 7.05 MB]                                                     [bootstrap]
Drush command terminated abnormally due to an unrecoverable error. [0.35 sec, 21.88 MB]                                        [error]
[1]    2966 exit 1     drush -d pm-list

Drupal 7.7 with some other modules. Disabling the module, or not using redirect solves the error.

CommentFileSizeAuthor
#17 1285210_d6-2.patch937 bytesthekenshow
#15 1285210_d6.patch794 bytesthekenshow
#2 1285210-2.patch746 bytesanon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anon’s picture

Same issue here!

anon’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Active » Needs review
FileSize
746 bytes

Here is a patch.

It checks if the site is called by php cli (drush), in that case, it will skip everything in the hook_init implementation for this module.

lslinnet’s picture

Status: Needs review » Reviewed & tested by the community

This works!

anon’s picture

Priority: Normal » Major
francois o’s picture

Worked for me

logaritmisk’s picture

Works for me as well

timhilliard’s picture

Hi guys,

Thanks for raising this issue with me. I will add it in as soon as I can.

Thanks,
Tim

timhilliard’s picture

Status: Reviewed & tested by the community » Needs review

Hi guys I've just committed this change to the dev branch of front page module. Please test this so I can release it.

Thanks,
Tim

anon’s picture

Status: Needs review » Reviewed & tested by the community

works like a charm.

Robin van Emden’s picture

Encountered this issue, latest dev did indeed fix the problem. Encountered no other issues. Reviewed and tested.

timhilliard’s picture

Assigned: Unassigned » timhilliard
Status: Reviewed & tested by the community » Patch (to be ported)
Issue tags: +Needs backport to D6

Have now released this in latest 7.x-2.x version. Need to roll this into 6.x-2.x version. I should not have to roll it into the 1.x versions as they don't use the hook_init function.

Thanks,
Tim

blackclover’s picture

Subscribe
Love Frontpage and it's a necessity for my site but I need to run cron every 15 minutes so I can't use poorman's cron.

Drupal 7.10
I updated to the latest 7.x-2.x version and tested but I still get the same issue

If Frontpage is enabled the cron job I set up in Cpanel on my dedicated server /usr/bin/lynx -source http://www.example.com/cron.php?cron_key=xxxxx doesn't run because lynx is redirected to index.php.

If Frontpage is disabled the scheduled Cpanel cron job runs fine.

Simon Georges’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

@blacklover, your problem seems to be covered by #1620074: redirect breaks cron.
By the way, the issue is now related to 6.x-2.x, so changing version.

thekenshow’s picture

Title: Redirect breaks drush » D6 patch
FileSize
794 bytes

The attached patch works for me on D6, testing for drush_verify_cli() and then using same if it exists.

Simon Georges’s picture

Title: D6 patch » Redirect breaks drush
Status: Patch (to be ported) » Needs review
thekenshow’s picture

FileSize
937 bytes

After an exchange with jonhattan on #drush IRC, the recommended way to test for D6 drush execution is to see if drush_main() exists, period. That confirms both: drush is installed and drupal has bootstrapped under drush. Updated patch attached.

Simon Georges’s picture

Assigned: timhilliard » Unassigned
Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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

erickbj’s picture

Status: Closed (fixed) » Active

I ran into the same issue, downloaded the latest 6.x-2.0-rc1 release and I don't see any checks for drush_main(). Where can I get an updated version with that fix?

Thanks!

Simon Georges’s picture

The 6.x version is not maintained any more, due to lack of time, so I wouldn't expect a release, but you may eventually checkout the 6.x-2.x branch directly from git or apply the patch from #17 on your code.