Closed (duplicate)
Project:
File Framework
Version:
6.x-1.0-alpha4
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2009 at 02:35 UTC
Updated:
14 Jan 2013 at 14:34 UTC
I've setup File Framework correctly to my knowledge, with all stable releases (not dev) on Acquia Drupal 6 base.
Modules are in sites/all/modules and I've recreated the database just in case that was the problem.
However, every time I try to go create content >> file, I get the following error message:
warning: array_diff_key() [function.array-diff-key]: Argument #1 is not an array in /var/www/html/sites/all/modules/bitcache/bitcache.module on line 677.
warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/html/sites/all/modules/bitcache/bitcache.module on line 677.
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/html/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 /var/www/html/sites/all/modules/bitcache/bitcache.module on line 681 and defined in /var/www/html/sites/all/modules/bitcache/adapters/file.inc on line 13.
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/html/sites/all/modules/bitcache/adapters/file.inc on line 21.
The directory does not exist.
warning: copy(/76cf2e258ed2c49a79864dc671cce46f4fd13281) [function.copy]: failed to open stream: Permission denied in /var/www/html/sites/all/modules/bitcache/adapters/file.inc on line 163.
Error saving file document.pdf. Please, contact site administrator.
A file upload must be provided.
when the page loads with that error, there is no file in the file attach box (hence the last error message)
Am I just being stupid and missing something here?
All those files are in the bitcache module folder. I'm banging my head against brick wall here. I'm loving what File Framework can do, just not impressed by my so-called skills to get it setup so far :$
Thanks in advance!
Comments
Comment #1
miglius commentedCan you open a 'admin/settings/bitcache/repositories' page and check if a repository called "File framework" is in the list. If it's not, then for some reason the default file repository was not created on the install. Did you get any errors while installing File framework and bitcache modules?
Comment #2
waako commentedaah no "File Framework" repository there, just default!
I didn't get any errors when installing either modules. RDF and Bitcache installed first, then File Framework.
I'll try dumping database again, and reinstalling them, see if that helps. Now I know what to look for.
Should Bitcache create that repository when File Framework installs or even before?
Thanks for the help miglius
Comment #3
miglius commentedFileFramework on install should create a 'file' repository in bitcache.
Comment #4
waako commentedI scrapped everything and started again, and it did create the repository this time.
For info for anyone else, make sure you enable RDF module, apply, then enable Bitcache, apply, then finally enable File.
Doing Bitcache first, or together with RDF seems to break it in my case.
Also, ensure you create folder "file" in sites/default/files/bitcache/ and enable write permissions on the "file" folder.
Then everything should work sweetly!
I can now upload files, sweeeet! Now to enjoy the rest of this awesome looking module...
Thank miglius, I obviously just needed to be led by the hand
Comment #5
waako commentedComment #6
miglius commentedRDF, Bitcache and FileFramework can be enabled at the same time. I think the root cause in your case was the lack of the write permissions to the file folder.
Comment #7
kmontyI had the exact same problem as waako and unenabling, uninstalling, and reenabling using the steps provided in #4 fixed my issue. I suspect this is a bug, or at least should be documented in INSTALL.txt as a good method to follow.
Comment #8
v8powerage commentedIndeed this solved problem with adding content, however it gets me back to my previous issue (#408504: 403 Forbidden Error when downloading from bitcache), because uploaded content is not displayed, and it's not downloadable.
After uploading file those errors appeared:
Comment #9
ailgm commentedI've performed the steps in the order specified, and still don't get a "File Framework" repository (two are there: Default / kind: Database, and Default (file system) / kind: File). How can I create this manually?
Comment #10
ailgm commentedI changed the Default (file system) repository to "File framework" and that seemed to clear up the problem. I'm not convinced this is perfectly correct, as the repository is available for editing whereas it is not on a site where it installed cleanly. Nevertheless, perhaps this will help someone.
Comment #11
ansorg commentedRun into the same error on a server where it had worked before I did a complete wipe of the drupal installation.
When I started from schratch again I enabled the File module and let it automatically pull in all other modules it depends on. But with this setup I got the above mentioned error.
So I reinstalled all file related modules and installed every module one by one in the right order and now it seems to work
Comment #12
miglius commented@ansorg
How did you enable File module without having all dependent modules? Have you use drush?
Comment #13
mstef commented[edit out]
Comment #14
ansorg commentedsorry, bad wording I guess. I had of course downloaded all modules and put in the file system. Then I enabled the File module and drupal asked for all the others it depends on and I let drupal enable those too.
Comment #15
willzzz88 commentedI finally fixed this nasty bug by disabling all the plugins and uninstalling them. Then based on the SQL server error I MANUALLY used phpmyadmin (or whatever tool you like) in the SQL database and deleted the table rdf_data_file that was left. Apparently the uninstalling & disabling them doesn´t clear all the old SQL entries which is the root of this problem. Then you can install with the order described above.
Comment #16
DrewMathers commentedThe only thing that worked for me was creating the repository directory manually before installing File Framework. This is a workaround for this Bitcache bug: #467570: Parent directory not created when using file adapter
Comment #17
rinno.casca commentedAfter trying all of the suggestions above including #4, #10, #11, I didn't know how to do #15. Considering there is no replies on this thread and no solutions are posted, I am giving up on this module until a fix is released. Here is my error, it maybe a little different:
Error saving file 423.doc. Please, contact site administrator.
A file upload must be provided.
Beyond frustrated, any help appreciated.
Comment #18
johanneshahn commentedhttp://drupal.org/node/414782
Comment #19
lorenz commentedWithout reading all the comments above, the part which says
warning: copy(/76cf2e258ed2c49a79864dc671cce46f4fd13281) [function.copy]: failed to open stream: Permission denied in /var/www/html/sites/all/modules/bitcache/adapters/file.inc on line 163.could be related to wrong file permissions on sites/default/files/bitcache directory. Changing it to rwx for all solved the problem for me.