Closed (fixed)
Project:
filedepot
Version:
6.x-1.0-rc2
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
18 May 2010 at 23:09 UTC
Updated:
27 May 2014 at 15:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ldav1s commentedThis can be fixed by commenting out these lines in filedepot.module around line 855:
foreach ($depotfiles as $id => $remove) {
$filedepot->deleteFile($id);
}
Unfortunately, content management uses this to track files also, so just commenting them out will break those functions.
Comment #2
blainelang commentedI can confirm the issue but that is definitely not the fix -- give me some time to work on it.
Comment #3
blainelang commentedComment #4
blainelang commentedThis is a lot more complex and is related (as I believe) to the node cache. When moving the files, the module has to unlink and link the related attachments to the node relationship and the code is not presently doing that. The folder relationships as maintained by filedepot tables are updated but when a new file is added (to original folder or the new folder) the cached node data will make it appear to the existing filedepot code that you either just added files or remove files via the native drupal interface.
I am presently working on a solution but has anyone seen a module that moves attachments between nodes?
I am testing code now to attach the attachment related file object to the node and use node_save() but was having issues last night - maybe fresh coffee this morning will help.
Comment #5
blainelang commentedIt's not really the node cache that is at fault but the related CCK table that tracks the attachments for the cck filefield that makes up the filedepot_folder content type node record.
The table 'content_field_filedepot_file' - has a record for each file (node attachment), needs to be updated and my attempts to do this through the node_save was not successful and I did not see an available API to do this but have a solution that looks to be working. Unfortunately, I needed to resort to direct table updates.
Has anyone seen a module that moves node attachments or cck node fields between nodes?
Attached is a zip file with the 2 modified files - please test and let me know if you see any more issues related to moving files and uploading files into effected folders after the move.
Comment #6
ldav1s commentedI applied the patch, and tried steps 1-4 with just one file. It worked.
I also went to the content administration page and this is the _first_ time I've noticed that a moved file has showed up in the Edit menu's Folder File.
Nice job!
Comment #7
blainelang commentedWhew - thanks!
I am updating CVS now in preparation for a new release.
Comment #8
blainelang commentedComment #9
ldav1s commentedFixed in 1.0-rc3.