I found that with Private Download turned on in Drupal, the inline filters generated an invalid image path. I fixed this in my local copy of acidfree by modifying the "_acidfree_filter_tag" function as follows:
Replace these lines:
if (max($width, $height) > $tsize) {
$filepath = _acidfree_get_thumb_path($node, 'preview');
} else {
$filepath = _acidfree_get_thumb_path($node);
}
With these lines:
$file_size = (max($width, $height) > $tsize) ? 'preview' : 'thumbnail';
$filepath = _acidfree_get_thumb_path($node, $file_size);
if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE) {
$img_src = _acidfree_get_thumb_url($node, $file_size);
}
else {
$img_src = $filepath;
}
Then in the two "theme" calls just below, pass $img_src as the second parameter instead of $filepath
Comments
Comment #1
sl27257Another solution is to change the "offending" five lines to:
I.e. change "path" to "url" and use the file_create_url capability to adopt the path/url to the private method.
Comment #2
vhmauery commentedFixed in CVS.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.