I noticed that there seems to be some issues with Drupal's page caching and filefield_aliases. The problem occurs with caching turned on and if an anonymous user hits a cached pdf (possibly other types too) the returned data has the wrong header type and so the data is displayed as plain text. The way I got around this problem was to use this module: http://drupal.org/project/cacheexclude to exclude filefield_paths/* from being cached. After emptying the page cache the files were able to be accessed fine with page caching turned on.

A better way to do this would be to put a hook_init function in the filefield_aliases module that had some path matching logic and on a filefield_paths match stops the request being cached:
$GLOBALS['conf']['cache'] = FALSE;

Other than this issue I've found the module to be excellent so far, thanks for your time.

Comments

tanc’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

Sorry, marked this as 5.x.1.x-dev when its supposed to be a bug report for the 6.x-1.x-dev branch.

tanc’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev

Please forgive me, I must be tripping. Its 5.x.1.x-dev I noticed this on.

Deciphered’s picture

Hi Tanc,

Just a quick message to say I'm not ignoring this issue, or your other issue, just haven't had much time to play with Aliases functionality lately.

Will look into these issues as soon as I can.

Cheers,
Deciphered.

Deciphered’s picture

Project: File (Field) Paths » File Aliases

Issue moved to File Aliases.

tanc’s picture

No problem deciphered. This is an excellent module and will be used on a lot of our future sites so I'd like to get these fixes in the code if possible. Let me know if you need more information or help.

Mamoun’s picture

Version: 5.x-1.x-dev » 6.x-1.1

I have the same problem using the drupal 6 version, was this bug fixed now?

Deciphered’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

The Drupal 6 version of this module will not be receiving any more support.