Patch (to be ported)
Project:
Media Mover
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
5 Nov 2008 at 22:37 UTC
Updated:
5 Dec 2008 at 22:56 UTC
Jump to comment: Most recent file
In mm_content.module
function mm_content_harvest($action, $configuration, $running_config, $nid)
should be: (I think!)
function mm_content_harvest($configuration, $running_config, $nid)
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | mm_cck.module.patch | 442 bytes | jcmarco |
| #3 | mm_cck.module.patch | 1.53 KB | jcmarco |
Comments
Comment #1
falk_g commentedIs this why I get the
"PHP Fatal error: Cannot use object of type stdClass as array in /home/32/fgprotoc/drupal/sites/all/modules/media_mover/mm_content/mm_content.module on line 144"
error in the beta 11?
I try it out without the $action as you suggested - will report back in a second...
update: removing $action is getting rid of the error above - but there seems also a problem in the sql query right below... when I run an MM config I get the following error:
as you can see the actual table prefix was not added to the content_type_mmtest it should read drupal_live_content_type_mmtest instead.
Reading the corresponding code I see a that something was added to the SQL chain - possibly later because it doesn´t follow the drupal convention of using %s %f %d or similar for db_query()
'$db_info['table']'which is pulled fromcontent_database_info($fields[$field_name])this is where my knowledge ends but I will investigate further...
Update2:
ok the curly brackets where missing. Removing $action and changing the sql query doesn´t give me any more errors, it doesn´t harvest anything either so... :( anyone got it working?
line 144:
Comment #2
falk_g commentedOk got it working with fusing some of d6 cvs in and adding the changes above.
here is the whole thing:
function: mm_content_harvest
line: 132
module: mm_content.module
Update 1:
taking out the test drupal messages and adding a file ID to the $file object
Comment #3
jcmarco commentedI have tested this patch, and without it there is no way to harvest any ckk_field.
I have updated the patch for the new mm_cck.module
Comment #4
arthurf commentedjcmarco- this is almost exactly what I did with the D6 branch, except that you got the argument order right and I did not. I'll apply this to the D5 branch and apply the argument fix to the D6 branch. Please feel free to test.
Note, the module has been renamed mm_cck which I think makes more sense.
Comment #5
aaron commentedAm going to try this against the d6 version as well, will roll a patch if I can get it working successfully. However, the module is still named mm_content from what I can tell.
Comment #6
arthurf commentedSorry Aaron- the rename is in the D5 branch has not be applied to the D6 branch. Things to do.. things to do.
Comment #7
aaron commentedI tried simply changing the arguments to
but now it results in
recoverable fatal error: Object of class stdClass could not be converted to string in /home/youdrup/domains/youdrup.com/public_html/sites/all/modules/media_mover/mm_content/mm_content.module on line 138.Comment #8
jcmarco commentedRunning last 5.x-dev with the patch I got this with a WSOD:
warning: Missing argument 4 for mm_cck_harvest(), called in /home/webapps/devel/current/sites/all/modules/media_mover/mm_cck/mm_cck.module on line 52 and defined in /home/webapps/devel/current/sites/all/modules/media_mover/mm_cck/mm_cck.module on line 132.
Where the function is call on this way:
return mm_cck_harvest($configuration, $running_config, $nid);
But the new release is defined as:
function mm_cck_harvest($action, $configuration, $running_config, $nid) {
In the version 6 you are calling the mm_content_harvest function with $action although is not used into the mm_content_harvest function.
I send a new patch for v5.x removing the $action parameter in the mm_cck_harvest function.
Anyway it is up to you to decide if version 6 (and also v5) uses the $action parameter or not but this parameter is not used into the function and then use the right function call into the module. It seems a bug in the 6.x-dev version.
Comment #9
arthurf commented@jcmarco - I've done a number of fixes in the D6 branch which clean this issue up. They need to be backported to D5, along with a large number of other changes that have gone into the D6 version