Make all repositories configurable

Dave Cohen - April 14, 2009 - 20:32
Project:Bitcache
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Arto
Status:active
Issue tags:File Framework
Description

I have a site whose domain has changed. I get an error The directory sites/DOMAIN/files/bitcache/file does not exist and there's nothing I can do about it.

I've been looking at code and as far as I can tell the bitcache in question has the name "File Framework" and it cannot be edited or deleted or changed in any way, presumably because of the test for $configurable in bitcache_admin_repos(). Frankly, I question the wisdom of making some bitcaches not configurable by any user.

But what I'd really like is for that bitcache directory to be something like files/bitcache/file, or !site_dir/files/bitcache/file, where !site_dir gets substituted dynamically depending on the url I used to access the server.

Is there anyway, other than manually editing the serialized data in the database, to solve this problem? Thanks for any help.

#1

Arto - May 19, 2009 - 17:02
Title:The directory sites/DOMAIN/files/bitcache/file does not exist.» Make all repositories configurable
Assigned to:Anonymous» Arto

Dave, apologies for the headache caused. You are right about the questionable wisdom of "locking down" this setting. There are reasons for why this was done (including other headaches caused by people changing the File Framework path and expecting Bitcache to automatically move their multi-gigabyte repository, without any consideration for PHP timeout settings and the like).

However, I think future versions of Bitcache and File Framework will need to relax this constraint to prevent problems like the one you're experiencing.

But for now, you will need to edit either the code (to temporarily set $configurable = TRUE; so that you can edit any repository) or else the file path stored in the database. In the latter case, the specifics depend on which version of the module you are using; in the newest releases, the settings are stored in the bitcache_repositories table.

#2

Arto - May 19, 2009 - 17:04

Thinking about it further, you could also execute this SQL command to make the repository configurable:

UPDATE bitcache_repositories SET module = '' WHERE module = 'file';

This will "unassociate" the repository from File Framework, but will not adversely affect anything File Framework does.

#3

Arto - May 19, 2009 - 17:05
Category:bug report» feature request

#4

Dave Cohen - May 19, 2009 - 19:40

Thanks for the ideas. I worked around it by temporarily making the repository configurable.

Agreed it should be made easier for others who run into this. Personally I use this module because the fileframework requires it, but I have no idea what it does. I imagine others are the same way.

 
 

Drupal is a registered trademark of Dries Buytaert.