Closed (fixed)
Project:
Hostmaster (Aegir)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2011 at 23:40 UTC
Updated:
30 Nov 2011 at 08:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedWe were calling user_load() in a way that, while works in D6/D7 due to them checking for a single integer argument 'just in case', does not work in Drupal 5 as it expects a proper array as an arg.
I've fixed this and tested it resetting a password in a D5, D6 and D7 site, but would appreciate someone else confirming it works (Steven?)
Cheers
Mig
Comment #2
Anonymous (not verified) commentedAaaaand, I just accidentally pushed that commit when pushing a fix for a separate issue :( oops!!! I'm a bit rusty..
I'm pretty confident in the fix though, but still would appreciate some testing..
Sorry about that..
Comment #3
steven jones commentedHmm...I'm fairly sure this won't work on D7, looking at the arguments to user_load, I think we might be better off using a call to
drush_drupal_major_versionand call the function appropriately.Comment #4
Anonymous (not verified) commentedStrange, it worked for me in D7 somehow. I'll test again
Comment #5
Anonymous (not verified) commentedAhh missed this message:
Somehow the reset still works, but yes, we shouldn't have this error.
I'll revert this patch that I accidentally committed (I'm back, can you tell! :( )
Comment #6
Anonymous (not verified) commentedreroll, please test!
Comment #7
steven jones commentedOkay, going to be annoying here, but we should actually test that we loaded an account, we'd have spotted the D5 bug much sooner if we had.
Something like:
<?php
if (empty($account)) {
// abort the drush command.
return drush_set_error();
}
Comment #8
Anonymous (not verified) commentedOK, new patch attached..
We seem to use drush_set_error() about 10 different ways, I went with your example from the tests/ dir.
Screenshot also attached of a forced error (deleted uid 1 from the test site). But would appreciate a full test across drupal 5, 6 and 7 (perhaps we should reset a login in our provision tests on each platform), as I no longer trust myself here..
Comment #9
steven jones commentedTested, cleaned up and pushed!
Thanks very much.