Closed (fixed)
Project:
Bitcache
Version:
6.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2010 at 06:33 UTC
Updated:
23 Mar 2012 at 07:15 UTC
I'm using Bitcache module integrated with FileFramework module. And also I installed i18n module because my site is multilangual.
And after installing this last module my links have preffixes, for ex. "http://mysite/ru/node/%" and if it is node 'file' this paths for bitcache don't work. But the paths to the files should be /bitcache/[hash], doesn't matter if the site is mysite/ node/% or mysite/ru/node/%. In my case language preffix is added in the file path. My drupal site is installed in the folder, not the webserver root.
I rewrote function bitcache_resolve_id() on bitcache.module:
function bitcache_resolve_id($id, array $options = array('absolute' => TRUE)) {
$url = url(BITCACHE_ALIAS . '/' . $id, $options);
$start = true;
while ($start)
{
$start = strpos($url, 'ru');
if ($start)
{
$url1 = substr($url, 0, $start);
$url2 = substr($url, $start+3);
$url = $url1 .$url2;
}
}
return $url;
}
and now it works for me.
Comments
Comment #1
nargiza commentedThis problem already solved on development version of File Framework module where I am using it.
Comment #2
Stupidscript commentedI'm having a similar path issue with File Framework. Here's from my server's error_log:
File does not exist: /var/www/html/modules/fileframework, referer: http://example.com/aliasDir/node/add/story
Where "aliasDir" = /var/www/sites/drupalSite, not /var/www/html
Unfortunately, I am still experiencing this issue after implementing the code, above.
Fedora 12, Drupal 6.3.16, all the latest modules (all green checkmarks in my upgrades page). I'm using fileframework-6.x-1.x-dev, but the problem also existed for me when I ran fileframework-6.x-1.0-alpha5.
Comment #3
johanneshahn commentedUse dev please