Retroactive like behavior when changing token source
| Project: | FileField Paths |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
From #372863: nid when editing a node:
It would be nice to allow similar behavior as that provided by 'Retroactive changes' to move files uploaded to a path built with a token (ie. [title]) that has later been changed.
Current behavior:
- Node created with title 'Test', files uploaded to path with settings '[title]'.
Files end up in folder '/files/Test'.
- Node is edited and title is changed to 'Edit', new files uploaded.
New files end up in folder '/files/Edit'.
Old files remain in folder '/files/Test'.
Proposed behavior:
- Node created with title 'Test', files uploaded to path with settings '[title]'.
Files end up in folder '/files/Test'.
- Node is edited and title is changed to 'Edit', new files uploaded.
New files end up in folder '/files/Edit'.
Old files are moved to folder '/files/Edit'.

#1
Put me in for this functionality! :)
#2
subscribing
#3
this would be horrible to do automatically. Then you could really mess up tons of pages on your site with a simple change..
Please if this is implemented make it ONLY optional, and surrounded by as much red tape as possible.
The last thing I want is an administrator making an 'improvement' and making all files previously uploaded to the site no longer show up.
#4
@westwesterson
Don't fret, there is no way that I would implement this as an always on feature, it will definitely be optional and it will be off by default.
Cheers,
Deciphered.
#5
Hope this is the right issue to add my thoughts to...
I have been testing how filefield_paths 6.x-1.3 works with image node creation as a token-compliant alternative to #103793: Add token support for image file directory and image names. It seems to work fine when creating image nodes; the uploaded file and derivative images are moved to the path created from the node's relevant token values (in my case tokens relating to taxonomy).
However when I edit an image node, change some taxonomy, select the "Rebuild derivative images" option on the image node edit form, then save the node without uploading a new image file, the "original" image file is left in the previous path but the derivatives are re-created in the default image path. I think this is because although filefield_paths_filefield_paths_process_file() is called during a node update, the image file is not identified as "new" so no action is taken by this function.
I would not expect ever to create paths from node titles, but taxonomy is a powerful feature and I do sometimes upload an image and set the taxonomy wrongly first time.
If I can think of some more specific suggestions I'll add them to this issue.
#6
I have started a new issue for my concerns about Rebuilding derivative images, see #564680: Add support for bulk rebuilds of derivative files in Image module.
#7
+1 and subscribe. This would be grand.
#8
Committed to DRUPAL-6--1.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.