Hi,

I use the release All-Versions-2.0 of 2009-Jun-09. My problem is that the enable command is not working. Here is the command log :

$ drush enable pathauto
X-Powered-By: PHP/5.2.5-pl1-gentoo
Set-Cookie: SESSc21f969b5f03d33d43e04f8f136e7682=87fa53837db71f0c2af1588b7a70c8b6; expires=Thu, 16 Jul 2009 17:25:32 GMT; path=/
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 23 Jun 2009 13:52:12 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Content-Type: text/html; charset=utf-8

The following modules will be enabled: pathauto, token
Do you really want to continue? (y/n): drush: Aborting.
Drush command could not be completed.                                [error]

The prompt is not asking me for y or n, error message is shown directlty.

The watchdog shows me the following errors :
fgets(): supplied argument is not a valid stream resource in [...]/drush/includes/drush.inc on line 474.
followed by
mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in [...]/www/includes/database.mysqli.inc on line 323.

I tried to track error down but unfortunately I was not able to fix it.

Regards,

Wanjee

CommentFileSizeAuthor
#4 drush.patch827 bytesaustinDev
#4 drush.inc_.patch426 bytesaustinDev
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

solutiondrop’s picture

This is also happening to me. The only difference is that I don't see the mysqli_real_escape_string() error in watchdog. It also occurs for disable.

I followed the advice that gave at http://drupal.org/node/412482#comment-1480302. It works, but that isn't really a solution since you should revert the change prescribed after you enable or disable a module.

Is this related to this: http://drupal.org/node/412482#comment-1480302 ?

Thanks for this incredibly helpful dev tool.

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

for some reason those headers are being printed to the page. perhaps you have a rogue contrib module. please disable all your modules except core and retry. if it is fixed, slowly reenable them and isolate the culprit.

solutiondrop’s picture

I have turned off all modules except the core and the problem persists. Is there anything else I can try or anything else I can tell you that could help?
Thanks.

austinDev’s picture

FileSize
426 bytes
827 bytes

I had the same problems, and the first, minor issue, the extra header information, I fixed by adding a -q to the php invocation of the drush.php file (drush.patch)

The second issue, afaik, was caused by a STDIN in the drush.inc file. The attached patch was my attempt to fix it. It works now, but I do get the extra sql warnings talked about here http://drupal.org/node/488000

This is my first attempt to provide input, so if it's not right, I would appreciate the feedback.

I'm using the latest drush-All-Versions-HEAD.tar.gz dated 7-29-09, and drupal 6.13

austinDev’s picture

Status: Postponed (maintainer needs more info) » Needs review

I submitted a patch, and didn't realize I needed to change the status. Any feedback welcome.

babbage’s picture

Marked #529680: Drush auto aborting, can't update modules as a duplicate of this issue.

moshe weitzman’s picture

the -q is masking a problem with your install.

the php STDIN change might be a good idea. Needs testing. WOuld be great if others who are having this problem give drush.inc_.patch a try.

stevestaso’s picture

I was having same problem when trying to update any module.
"Drush command could not be completed."
I Applied the drush.inc_.patch and it worked for 1 module so I tried the full drush update.

After all modules updated, I got this:

Backups were saved into the directory /home2/aloconne/www/drupal/backup/modules/20090813232435.                              [ok]
<br />
<b>Fatal error</b>:  Call to a member function get_access_callback() on a non-object in <b>/home2/aloconne/public_html/drupal/modules/acquia/views/plugins/views_plugin_display_page.inc</b> on line <b>78</b><br />
Drush command could not be completed.                                                                                        [error]
jrdixey’s picture

Applying drush.inc_.patch seemed to solve the problem for me, thanks for providing it!

My first time applying a patch, I feel like I've climbed one more rung towards Drupal power-user territory ... ;)

Details follow.

My sandbox install required an update to cck (from 6.x-2.3 to 6.x-2.5). Prior to the patch, I could not run "update" or "update cck" successfully. It would auto-enter "y" at the initial Y/N prompt, and then abort.

With the patch applied, the initial Y/N prompt paused as it's supposed to, and I was able to type in "y" which caused the update to be downloaded and installed successfully.

I then got a "pending database updates" message and a Y/N prompt, which did not pause for input:

You have pending database updates. Please run 'drush updatedb' or visit update.php in your browser. [warning] 
Finished performing updates.
The following updates are pending:

  nodereference module
  6001 - Create an index by node reference column for all fields.

  userreference module
  6001 - Create an index by user reference column for all fields.

Do you wish to run all pending updates? (y/n): y

I wasn't sure whether this was displaying the results of a database update or not, so at the next prompt I ran "drush updatedb".
The message I got said:

No database updates required
Finished performing updates.

So, I guess I can assume the necessary database updates were made automatically after the "Do you wish to run all pending updates?" prompt was auto-answered with a "y". But I don't know if it's a problem that with the patch in place, the second Y/N prompt didn't pause for input, so I thought I'd report this, in case it's helpful in terms of the patch.

If the auto-answering behavior for the database update is as designed, then perhaps the message to the user telling users to run "drush updatedb" could safely be removed. Or the auto-answering of the database update prompt could be documented in the README.

Cheers
Jennifer

WorldFallz’s picture

Status: Needs review » Reviewed & tested by the community

patch from #4 fixed the abort problem for me also, though I did receive the following error:

<b>Fatal error</b>:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required './sites/all/modules/views/includes/view.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/grumble/public_html/sandbox/sites/all/modules/views/views.module</b> on line <b>512</b><br />
Drush command could not be completed. 

Though I think this is separate and unrelated to the patch and the issue the patch fixes. For some reason I frequently get these kinds of errors at the end of drush commands related to views. Not sure why, but a quick cvs update of views generally fixes it.

imo, go ahead a commit the STDIN patch and open separate issues for any other problems remaining.

designerbrent’s picture

The second patch in #4 did the trick for me! Thanks alot!

moshe weitzman’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch and the testing. Committed.

Status: Fixed » Closed (fixed)

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