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

miglius’s picture

Status: Active » Postponed (maintainer needs more info)

Can 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?

waako’s picture

aah 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

miglius’s picture

FileFramework on install should create a 'file' repository in bitcache.

waako’s picture

I 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

waako’s picture

Status: Postponed (maintainer needs more info) » Fixed
miglius’s picture

RDF, 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.

kmonty’s picture

Status: Fixed » Active

I 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.

v8powerage’s picture

Indeed 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:

    * user warning: Column 'fid' cannot be null query: INSERT INTO files (fid, uid, filename, filepath, filemime, filesize, status, timestamp) VALUES (NULL, 3, 'drupal_bitcache_t60ybE', '/tmp/drupal_bitcache_t60ybE', 'application/octet-stream', 0, 0, 1239832402) in /home/unitra2/htdocs/modules/bitcache/bitcache.module on line 858.
 
ailgm’s picture

I'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?

ailgm’s picture

I 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.

ansorg’s picture

Run 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

miglius’s picture

Status: Active » Postponed (maintainer needs more info)

@ansorg

How did you enable File module without having all dependent modules? Have you use drush?

mstef’s picture

[edit out]

ansorg’s picture

sorry, 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.

willzzz88’s picture

I 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.

DrewMathers’s picture

The 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

rinno.casca’s picture

After 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.

johanneshahn’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
lorenz’s picture

Without 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.