In my node, I am setting my filename to [filefield-onlyname-original].[filefield-extension-original] and checked 'Cleanup using Pathauto'. Pathauto is set to change to lowercase and replace spaces (among other things). When I upload a file, the node does not show the cleaned up filename - the filename is shown with caps and spaces. If I edit the node and save without making any changes, the filename is fixed and shows up with no caps, and spaces replaced with hyphens.

The file itself is being saved properly with the name processed through pathauto.

For example, if I upload 'Test File.doc' it is saved as 'test-file.doc', but the filename shown in the node is 'Test File.doc' and the link is '.../Test File.doc' - neither of which are correct. By doing an edit and save on the node (with no changes) those become 'test-file.doc' and the link works.

Drupal 6.14
FileField 6.x-3.2
FileField Paths 6.x-1.4
Pathauto 6.x-1.2

Is this a bug or do I have a configuration problem?
Thanks

Comments

crosendahl’s picture

Title: pathauto cleanup not running initially » $file cache not clearing after pathauto cleanup

It looks like this is the same problem as http://drupal.org/node/641252

I don't have a solution, but the problem is that the original filename is getting cached in $file and is being used to display the filename and generate the path when the node is displayed. Editing and saving the node again fixes that, but I can't tell all my users to go through that when they upload something.

Suggestions?

(Changed name of this issue from 'pathauto cleanup not running initially'.)

crosendahl’s picture

Thanks for the clue in http://drupal.org/node/641252 that it was a module weight issue! I don't know what module was conflicting, but by changing the weight of filefield_path in the system table of the database from '0' to '20' the conflict went away and all is fine now. Simpler than writing a module to fix it, but subject to coming up again with an update of the module.

crosendahl’s picture

Status: Active » Closed (fixed)

I'm closing the issue.

agileware’s picture

Status: Closed (fixed) » Closed (duplicate)