Active
Project:
Web File Manager
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2009 at 14:50 UTC
Updated:
15 Nov 2010 at 23:00 UTC
Lets say your site allows revisions and you have a node with webfm attachments. If you revise your node (and submit it), then decide you need to revert the node to its previous state, all of the attachments are lost. They are actually deleted from the attach table.
Also, when you first enter a node with attachments, if you have a mandatory field on your node and you press submit without having completed the field (e.g the title) then all your attachments will be lost
Comments
Comment #1
geoff_eagles commentedThe problem also exists in webfm for drupal 6.
The cure is to put a test in the 'update' section of webfm_nodeapi.
Before calling webfm_dbupdate_attach you need to compare the node->vid and node-old_vid - if there's a difference of more than 1 then they're reverting to an old revision so you shouldn't be running dbupdate.
Comment #2
stacysimpson commentedDo you have a patch for this issue?
Comment #3
nhck commentedgeoff_eagles,
thank you for reporting this and helping to make webfm better. Actually I think this is an undefined behavior and also a feature request. It should be that we keep the vid as well to check which attachments belong to which revision.
Marking this as a feature request. For the other issue we have a "discusson" over here: #529074: Node preview restores detached file
Thank you very much.