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

sl27257’s picture

Another solution is to change the "offending" five lines to:

if (max($width, $height) > $tsize) {
      $filepath = _acidfree_get_thumb_url($node, 'preview');
   } else {
      $filepath = _acidfree_get_thumb_url($node);
}

I.e. change "path" to "url" and use the file_create_url capability to adopt the path/url to the private method.

vhmauery’s picture

Status: Active » Fixed

Fixed in CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.