This has now happened twice in a row. Here is the log:

576 $ drush update google_analytics
Refreshing update status information ...
Done.
Update information last refreshed: Fri, 06/19/2009 - 23:46

Update status information on all installed and enabled Drupal modules:
Name Installed Proposed Status
version version
Administration menu 6.x-1.4 6.x-1.4 Up to date
Administration Menu Dropdown 6.x-2.x-dev 6.x-2.x-dev Up to date
Archive 6.x-1.3 6.x-1.3 Up to date
Backup and Migrate 6.x-1.2 6.x-1.2 Up to date
Drupal 6.12 6.12 Up to date
Browscap 6.x-1.0 6.x-1.0 Up to date
Content Management Filter 6.x-1.6 6.x-1.6 Up to date
Content Templates 6.x-1.0 6.x-1.1 Update available
(Contemplate)
Content Construction Kit 6.x-2.4 6.x-2.4 Up to date
(CCK)
Dynamic Persistent Menu 6.x-1.0 6.x-1.0 Up to date
Email Field 6.x-1.2 6.x-1.2 Up to date
Event 6.x-2.x-dev 6.x-2.x-dev Update available
Frequently Asked Questions 6.x-1.8 6.x-1.8 Up to date
FCKeditor - WYSIWYG HTML 6.x-2.0-alpha 6.x-2.0-beta1 Update available
editor 4
FileField 6.x-3.0-beta3 6.x-3.0 SECURITY UPDATE
available
Global Redirect 6.x-1.2 6.x-1.2 Up to date
Google Analytics 6.x-1.3 6.x-2.2 Installed version
not supported
ImageAPI 6.x-1.5 6.x-1.6 Update available
ImageCache 6.x-2.0-beta8 6.x-2.0-beta9 Update available
ImageField 6.x-3.0-beta3 6.x-3.0 Update available
jQuery plugins 6.x-1.7 6.x-1.10 Update available
Lightbox2 6.x-1.9 6.x-1.9 Up to date
Login Menu 6.x-1.x-dev 6.x-1.x-dev Up to date
me aliases 6.x-1.4 6.x-1.10 Update available
Mobile Theme 6.x-1.x-dev 6.x-1.x-dev Update available
Mollom 6.x-1.7 6.x-1.8 Update available
Multiping 6.x-1.x-dev 6.x-1.x-dev Up to date
Nodetype 6.x-1.0 6.x-1.0 Up to date
Meta tags 6.x-1.0 6.x-1.0 Up to date
Pathauto 6.x-1.1 6.x-1.1 Up to date
Pingback 6.x-1.0 6.x-1.0 Up to date
Preferred Format 6.x-1.x-dev 6.x-1.x-dev Up to date
ShareThis 6.x-1.4 6.x-1.5 Update available
Shoutbox 6.x-1.0 6.x-1.0 Up to date
Signup 6.x-1.0-rc3 6.x-1.0-rc3 Up to date
Slideshow Creator 6.x-1.32 6.x-1.32 Up to date
Subscriptions 6.x-1.0-beta5 6.x-1.0-beta5 Up to date
Token 6.x-1.11 6.x-1.12 Update available
Views 6.x-2.3 6.x-2.6 SECURITY UPDATE
available
Workspace 6.x-1.3 6.x-1.3 Up to date
XML sitemap 6.x-1.x-dev 6.x-1.0-beta5 Update available

Code updates will be made to the following projects:
Google Analytics [google_analytics-6.x-2.2]

Note: Updated modules can potentially break your site. It's not recommended to update production sites without prior testing.
Note: A backup of your package will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue? (y/n): y
Project google_analytics was updated successfully. Installed version is now 6.x-2.2.
Backups were saved into the directory [ok]
/home/venturecocktail/public_html/drupal/backup/modules/20090619234615.

Fatal error: require_once(): Failed opening required 'sites/all/modules/pathauto/pathauto.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /home//public_html/drupal/sites/all/modules/pathauto/pathauto.module on line 84
Drush command could not be completed. [error]

Comments

prodosh’s picture

This seems to be the same issue or related to http://drupal.org/node/445498
Is there a patch for 2.0 or is the recommendation to use HEAD as a work around until a new release is available?

TIA

owen barton’s picture

This certainly looks like the same issue, but that one should be fixed in 2.0. Hence, either the fix is incomplete, or this is really a different issue.

Would you be able to help debug this on your system, or perhaps figure out a way to reproduce it reliably (e.g. by dl an old version of a module, enabling and then updating?).

prodosh’s picture

Sure, I will be happy to help with testing a fix. I am able to reproduce the problem reliably.
TIA

themselves’s picture

I had a very similar problem, and I traced it back to having a symlink in my modules directory. It tried to update a module that was symlinked, decided it didn't like it and deleted /sites. Odd behaviour, but it's definitely an issue.

rsvelko’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

So, @pban02 :

have you searched recursively your drupal install for symlinks? I would use: "find . -type l" to search for all symlinks beneath the current dir...

Next - have you examined pathauto's dir for anything strange?

Lastly do you have any modules/core patched? Try using my script for that if in doubt ( google for "drupdatecode" to find it )

jason ruyle’s picture

I just had this happen to me. I made the mistake of not putting this under version control, but lucky I was located at servint, who backs up sites.

I think that the symlink theory is right on.

After running drush update views (updating that module) I hit a pathauto error.

require_once(): Failed opening required 'sites/all/modules/pathauto/pathauto.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/sites/all/modules/pathauto/pathauto.module on line 84

Then my /sites/* was gone!

What was weird is I ended up typing cd views I think (to far back now) and it took me to:
/home/public_html/backup/

I was in /sites/all/modules when I was running drush commands. I forgot to mention I'm running the latest HEAD version of drush.

ElleKitty’s picture

Just had a similar thing happen to me, was fortunately able to recover from a backup. I got the same require_once() error except I forget in what and can't get to it through the buffer now. Pathauto is not installed on this site. The only module being updated was Captcha. I notice that one of the similar, older issues listed mentions that it is affected by having custom or custom-named modules and we do have a custom module installed on the site; it worked fine doing roughly the same update on a site with no custom modules.

moshe weitzman’s picture

Priority: Normal » Critical

Really, we need a concrete way to reproduce this problem, or a patch. Please help, folks.

elanghout’s picture

I have the same issue with "drush update". After update of module logging_alerts the whole 'sites' folder is gone (the 'all' and 'default' folders of the 'sites' folder are moved to the backup/modules/yyyymmddhhmmss/logging_alerts. The 'sites' folder itself is really gone.

Here it happens:
Project logging_alerts was updated successfully. Installed version is now 6.x-1.4.
Module emfield directory could not be found at [error]
/var/www/vhosts/standing-strong.com/subdomains/test/httpdocs/sites/default/modules/emfield,
perhaps the module is enabled but has been deleted from disk.

At the moment the module 'emfield' is about to be updated, it's already gone.

moshe weitzman’s picture

Status: Postponed (maintainer needs more info) » Active

Thats a good clue, elanghout . Hopefully someone can isolate the bug and contribute a patch based on it.

owen barton’s picture

Actually this behavior (sites directory moved to backup) is the exact same behavior that was reported in http://drupal.org/node/445498

At the time I managed to reproduce this and tracked it down (or so I thought) to update module sometimes returning an empty $release['path'] for a project. The following code fixed it for me at the time:

    if (empty($release['path'])) {
      drush_set_error('DRUSH_PM_UPDATING_NO_PROJECT_PATH', dt('Module !project path is not available, perhaps the module is enabled but has been deleted from disk.', array('!project' => $release['name'])));
      continue;
    }
    if (!is_dir($source)) {
      drush_set_error('DRUSH_PM_UPDATING_PATH_NOT_FOUND', dt('Module !project directory could not be found at !source, perhaps the module is enabled but has been deleted from disk.', array('!project' => $release['name'], '!source' => $source)));
      continue;
    }
moshe weitzman’s picture

We need some help here from people who can reproduce this.

greg.1.anderson’s picture

Bump - maybe the OP or some other folks on this chain can try to reproduce again; maybe #433950: Modernize updatecode command improved the situation?

owen barton’s picture

Status: Active » Fixed

I actually reproduced this once during my work on #433950: Modernize updatecode command and added a check that the project directory is within modules (or themes or whatever), which worked for me when simulating the issue - see below. It doesn't fix the underlying issue, because (of course) when I ran a second time it worked fine, so I couldn't figure out the cause - my guess is some kind of caching or race issue to do with multiple copies of a module in the same site.

    // Check that the directory exists, and is where we expect it to be.
    if (stripos($release['path'], $release['project_type']) === FALSE || !is_dir($release['full_project_path'])) {
      return drush_set_error('DRUSH_PM_UPDATING_PATH_NOT_FOUND', dt('The !project directory could not be found within the !types directory at !full_project_path, perhaps the project is enabled but has been deleted from disk.', array('!project' => $release['name'], '!type' => $release['project_type'], '!full_project_path' => $release['full_project_path'])));
    }

Am tentatively closing - if anyone notices this reoccurring on HEAD please reopen.

greg.1.anderson’s picture

Hey, updates that simply fail are way better than updates that remove the sites directory. That's a big improvement.

owen barton’s picture

Meh, I kinda liked removing the sites directory once in a while - it kept folks who ignored the (big all caps) warnings and tried to update their live site on their toes ;)

greg.1.anderson’s picture

Funny. Maybe drush updatecode should delete the sites folder if there were more than N users logged on to the site when it was brought offline (or always if the site was still online for the updatecode). Of course, we'd have to add a big all caps warning telling the admin that their sites folder was going to be deleted instead of updated. ;)

Status: Fixed » Closed (fixed)

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

Melissamcewen’s picture

Status: Closed (fixed) » Active

Happened to me:

Update status information on all installed and enabled Drupal modules:
Name Installed Proposed Status
version version
Administration menu 6.x-1.5 6.x-1.5 Up to date
Drupal 6.16 6.16 Up to date
Backup and Migrate 6.x-2.2 6.x-2.2 Up to date
Comment Notify 6.x-1.4 6.x-1.4 Up to date
Content 6.x-2.6 6.x-2.6 Up to date
Construction Kit
(CCK)
FileField 6.x-3.2 6.x-3.3 SECURITY UPDATE available
GMap Module 6.x-1.x-dev 6.x-1.0 Update available
Google Analytics 6.x-2.2 6.x-2.2 Up to date
ImageAPI 6.x-1.6 6.x-1.8 Update available
ImageCache 6.x-2.0-beta10 6.x-2.0-beta10 Up to date
ImageField 6.x-3.2 6.x-3.3 SECURITY UPDATE available
Insert 6.x-1.0-beta2 6.x-1.0-beta4 Update available
jQuery UI 6.x-1.3 6.x-1.3 Up to date
Link 6.x-2.8 6.x-2.8 Up to date
Location 6.x-3.x-dev 6.x-3.0 Update available
Mollom 6.x-1.12 6.x-1.13 Update available
Nodequeue 6.x-2.5 6.x-2.9 Update available
Pathauto 6.x-1.2 6.x-1.3 Update available
Poormanscron 6.x-1.1 6.x-1.1 Up to date
Simplenews 6.x-1.1 6.x-1.1 Up to date
Thickbox 6.x-1.5 6.x-1.6 Update available
Token 6.x-1.12 6.x-1.12 Up to date
Troll 6.x-1.x-dev 6.x-1.x-dev Up to date
Views 6.x-2.10 6.x-2.10 Up to date
Views PHP Filter 6.x-1.0-beta1 6.x-1.0-beta1 Up to date
Wysiwyg 6.x-2.0 6.x-2.1 Update available
Acquia Marina 6.x-1.9 6.x-3.0-beta1 Installed version not
supported

Code updates will be made to the following projects:
FileField [filefield-6.x-3.3], GMap Module [gmap-6.x-1.0], ImageAPI [imageapi-6.x-1.8], ImageField [imagefield-6.x-3.3], Insert [insert-6.x-1.0-beta4], Location [location-6.x-3.0], Mollom [mollom-6.x-1.13], Nodequeue [nodequeue-6.x-2.9], Pathauto [pathauto-6.x-1.3], Thickbox [thickbox-6.x-1.6], Wysiwyg [wysiwyg-6.x-2.1], Acquia Marina [acquia_marina-6.x-3.0-beta1]

Note: Updated modules can potentially break your site. It's not recommended to update production sites without prior testing.
Note: A backup of your package will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue? (y/n): y
Project filefield was updated successfully. Installed version is now 6.x-3.3.
Project gmap was updated successfully. Installed version is now 6.x-1.0.
Project imageapi was updated successfully. Installed version is now 6.x-1.8.
Project imagefield was updated successfully. Installed version is now 6.x-3.3.
Project insert was updated successfully. Installed version is now 6.x-1.0-beta4.
Project location was updated successfully. Installed version is now 6.x-3.0.
Project mollom was updated successfully. Installed version is now 6.x-1.13.
Project nodequeue was updated successfully. Installed version is now 6.x-2.9.
Project pathauto was updated successfully. Installed version is now 6.x-1.3.
Project thickbox was updated successfully. Installed version is now 6.x-1.6.
Project wysiwyg was updated successfully. Installed version is now 6.x-2.1.
Module acquia_marina path is not available, perhaps the module is [error]
enabled but has been deleted from disk.
Backups were saved into the directory [ok]
/home/mgmcewen/huntgatherlove.com/backup/modules/20100516111751.

Fatal error: require_once(): Failed opening required './sites/all/modules/backup_migrate/includes/crud.inc' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/mgmcewen/huntgatherlove.com/sites/all/modules/backup_migrate/backup_migrate.module on line 208
Drush command could not be completed.

greg.1.anderson’s picture

Status: Active » Postponed (maintainer needs more info)

What version of Drush are you using?

Melissamcewen’s picture

Status: Postponed (maintainer needs more info) » Active

2.1, should this be a new issue then?

greg.1.anderson’s picture

Status: Active » Fixed

drush-2.1 is unsupported. You'll have to either fix it yourself, or move to drush-3.0-stable. I recommend the later.

Status: Fixed » Closed (fixed)
Issue tags: -drush, -update, -sites deleted, -critical

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