MM CCK: Delete file attached to node

arthurf - September 15, 2009 - 04:06
Project:Media Mover
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:arthurf
Status:reviewed & tested by the community
Description

(See http://drupal.org/node/532170)

Media Mover CCK does not properly support deletion of files attached to CCK fields. It should support the $op = 'delete' in the hook_media_mover.

#1

szczym - September 17, 2009 - 02:29

i just tested newest dev version (2009-Sep-17) on fresh drupal install. after deleting file from cck filefiled via mm interface (single delete file on admin/build/media_mover/config/1/files) i get flllowing errors:

* warning: Invalid argument supplied for foreach() in /home/szczym/tescik/sites/all/modules/cck/content.module on line 982.
* warning: Invalid argument supplied for foreach() in /home/szczym/tescik/sites/all/modules/cck/content.module on line 1244.
* warning: Invalid argument supplied for foreach() in /home/szczym/tescik/sites/all/modules/media_mover/mm_cck/mm_cck.module on line 619.
* user warning: Unknown column 'fields' in 'where clause' query: SELECT COUNT(*) FROM media_mover_files WHERE cid = fields in /home/szczym/tescik/sites/all/modules/media_mover/media_mover_api.module on line 2647.
* user warning: Unknown column 'fields' in 'where clause' query: SELECT * FROM media_mover_files WHERE cid = fields ORDER BY date DESC LIMIT 0, 10 in /home/szczym/tescik/sites/all/modules/media_mover/media_mover_api.module on line 2647.

#2

arthurf - September 17, 2009 - 03:11

Huh. I'm not getting these errors, but I've added some debugging code (watchdog) and did some cleanup on the the configuration files page to make things work a bit better. Can you give the latest from CVS a try?

#3

szczym - September 17, 2009 - 03:45
Status:active» reviewed & tested by the community

I just tested newest cvs version (2009-Sep-17 after #263908 commit ) on fresh drupal install. the issue is solved, its possible to delete files, no wired errors in log. files are gone from mm intercase, cck filefiled and disk.

Bravo Arthur !

 
 

Drupal is a registered trademark of Dries Buytaert.