Closed (fixed)
Project:
Media Mover
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2009 at 14:00 UTC
Updated:
17 Nov 2009 at 20:52 UTC
Jump to comment: Most recent file
Comments
Comment #1
szczym commentedBTW: Its not running again first configuration (harvest) only the following ones.
Comment #2
szczym commentedit migh be some how related to this issue: #342583: Problem with CCK harvesting
Comment #3
venkiparam commentedI had the same issue. The problem is with the mm_cck submodule. I was able to create a patch which solved this issue.
There are two major fixes in it.
1. It fixes the case where files are picked up multiple times (Though little dirty fix, but wanted to fix this with minimal change to the original code)
2. It fixes the case where, if you delete a configurations files and rerun the configuration. The new file will not get properly attached to the cck fields (Don know how to put it clearly, but try deleting a configs file and rerun the config, you will get the point)
apart from this there are few debug statements which you can ignore.
Thanks szczym for testing the patch.
Comment #4
szczym commentedIndeed it works and solves the problem! well done venkiparam!
Comment #5
arthurf commentedThis patch looks good. I'll remove the commented out watchdog calls and apply it. Thanks for your work on this- I've been swamped this summer and haven't had much time to devote to things.
Comment #6
arthurf commentedI've committed this to the 6-1x branch. I also did some whitespace cleanup. I have one question about the patch- line 509 changes:
It strikes me that if there is data on the first item on that field it will be destroyed - or am I missing something here? At any rate, in the hopes that I'm wrong, I committed it.
Comment #7
venkiparam commentedThanks szczym.
arthurf
Let me put the motive behind the change and then lets see if its really is required, I will need your help arthurf.
Consider this case.
1. You run your configuration which stores a file to the cck filefield.
2. You think that the configuration needs to be rerun(for some reason) only on a specific node.
3. You go and delete the files associated with the configuration.
4. Rerun the configuration, so that the new file gets stored to cck.
The issue lies in step 3 & 4.
-When you delete files associated with the configuration the cck filefield is not cleared.
-As a result when you rerun the configuration old file still exists at index '0' of this array $node->{$field['field_name']}[] and the new files goes into index location '1'. Due to this when cck stores the files, only the file at index '0' gets saved(Which is the old file) and the file at index '1' (Which is the new one) is ignored.
Meaning any time you rerun a configuration for a node the old files are not overwritten. I opted to fix the issue is step 4, but this can as well be fixed in step 3. What say ?
venkiparam
Comment #8
szczym commentedArthur thanx for your time!
Could you have a look on another important patch, that we have developed together with zaczek and venkiparam:
#486206: Files transcoded but not added to filefiled
Sorry for posting in wrong place, i have send you mail about that also few days ago.
cheers !
Comment #9
arthurf commentedvenkiparam- Thanks for the detailed report. I think I'd like to fix the delete issue as that should work anyway :)
The question I think is that we should make sure that we can delete files attached to a node that were placed there by the MM Configuration. I think I can handle this by looking at the data in the MM Files table. I'll make a comment here once I have some code put together.
Comment #10
arthurf commentedSome notes
* I've moved the CCK file delete issue to: http://drupal.org/node/577650
* In the latest commit, I've implemented
$node->{$field['field_name']}[]It would be great to get some testing against 6.1x - these fixes are hopefully going to fix some of this!
Comment #11
szczym commentedI just tested newest dev version (2009-Sep-17) on fresh drupal install. the issue is solved, configs dont run every time i press run
;)
Comment #12
arthurf commentedAwesome!
Comment #13
arthurf commentedclosed