(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.

Comments

szczym’s picture

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.

arthurf’s picture

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?

szczym’s picture

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 !