In trying to resolve the issue documented in http://drupal.org/node/425884, I uninstalled "File" (which is, I think, the File Framework" project.
This deleted almost all the files in the disk partition which contained Drupal. The file structure on the partition looked like this:
- Intranet
- Drupal
- Sugar
- phpBB
- localbackup
- PS
- UA
- Test
All the non-read-only files in the Intranet and PS trees were deleted (!). Oddly, UA and Test were spared.
I have, fortunately, been able to reconstruct most of my work (and the work of many others!) from backups on other machines, but this was a catastrophe.
I'm new to Drupal (and a little discouraged), but perhaps this problem can be fixed? Some function needs to check its arguments, or needs to verify that it's not affecting anything above its own subtree.
Comments
Comment #1
miglius commentedI don't know how uninstalling the FileFramework could cause deletion of the mentioned files. Have you uninstalled bitcache as well?
Comment #2
jds013 commentedThank you very much looking at this!
Yes, I also attempted to uninstall bitcache, following the advice in http://drupal.org/node/425884.
After restoring my system, I am still get a variety of errors similar to what took me to node/425884... When accessing content:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT field_fundupload_value FROM content_field_fundupload WHERE vid = 98 AND delta = #after_build in D:\Intranet\drupal\sites\all\modules\fileframework\contrib\cck\file_cck.module on line 153.
And when trying to upload content:
* warning: array_diff_key() [function.array-diff-key]: Argument #1 is not an array in D:\Intranet\drupal\sites\all\modules\bitcache\bitcache.module on line 677.
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in D:\Intranet\drupal\sites\all\modules\bitcache\bitcache.module on line 677.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in D:\Intranet\drupal\sites\all\modules\bitcache\bitcache.module on line 677.
* recoverable fatal error: Argument 1 passed to Bitcache_FileRepository::__construct() must be an array, null given, called in D:\Intranet\drupal\sites\all\modules\bitcache\bitcache.module on line 681 and defined in D:\Intranet\drupal\sites\all\modules\bitcache\adapters\file.inc on line 13.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in D:\Intranet\drupal\sites\all\modules\bitcache\adapters\file.inc on line 21.
* The directory does not exist.
* warning: array_diff_key() [function.array-diff-key]: Argument #1 is not an array in D:\Intranet\drupal\sites\all\modules\bitcache\bitcache.module on line 677.
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in D:\Intranet\drupal\sites\all\modules\bitcache\bitcache.module on line 677.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in D:\Intranet\drupal\sites\all\modules\bitcache\bitcache.module on line 677.
* recoverable fatal error: Argument 1 passed to Bitcache_FileRepository::__construct() must be an array, null given, called in D:\Intranet\drupal\sites\all\modules\bitcache\bitcache.module on line 681 and defined in D:\Intranet\drupal\sites\all\modules\bitcache\adapters\file.inc on line 13.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in D:\Intranet\drupal\sites\all\modules\bitcache\adapters\file.inc on line 21.
* Error saving file Test Fund Prospectus.pdf. Please, contact site administrator.
Comment #3
jds013 commentedI abandoned the problem Drupal setup and started over with a clean database and new downloads. I won't uninstall anything...
Comment #4
DrewMathers commentedI have replicated this issue, but I am not sure what is causing it. The uninstaller calls a couple of functions in Bitcache and RDF to remove the 'file' repository. In my case the file repository was never created in the first place. Maybe this is causing the uninstaller to run amok.
Comment #5
DrewMathers commentedI have confirmed my theory stated above. When the correct Bitcache 'file' repository is in place, uninstalling the FF File module behaves correctly. If the 'file' repository is not there, Bitcache (6.x-1.0-beta2) goes crazy and deletes everything it can find.
I can see how this could be missed in Bitcache testing. The deletion function is normally called from the Bitcache user interface, where is not possible to try to delete a non-existent repository.
This is a known Bitcache issue: #370433: Bitcache deletes files from system (was: Eiether Views 2 or File Framework just deleted every file in my public folder)
Comment #6
cmjns commentedREALLY???!!!!!! This issue has been out since July and discussed until January and it still isn't fixed? This module just hosed my whole server. I can't even ls. Guess I've (re)learned a lesson about root. But "catastrophy" as mentioned above is an UNDERSTATEMENT. Please, get this fixed or remove the module from the repos!
Comment #7
johanneshahn commentedhi,
i replaced the bitcache adapter file in bitcache module with a other adapter (file2).
the new adapter has no functions to remove complete directories anymore. user has to
remove all bitcache files manually from server.
please run update.php after install latest dev version of fileframework.
before try to uninstall please make sure that all bitcache repositories for fileframework had
the file2 adapter. Visible via MySQL table bitcache_repositories.