I get this warning when I upgraded my site from 6.x-3.3 to 6.x-3.4.
Suggested fix attached.
Comment moved to http://drupal.org/node/829890.
@1: I think your issue is related to #829890: 6.x-3.4 Not Appearing in Available Updates, namely that 6.x-3.4 hasn't appeared in the available releases information yet. It's unrelated to the original post.
Changing priority back to Normal since the relevant issue was moved. Sorry for the chaos.
I just updated to 6.x-3.4, and I've got the same problem. How can I fix this, please help
#1 fixed the problem. The warning disappeared. Thank you.
Me too, after updating to 6.x-3.4 I get the same error.
#1 fixes it. Thanks!
The same errors appears for me after upgrade to 3.4.
Fix from #1 seems to work.
Please release new version with patches from #1 and http://drupal.org/node/829920 #10
Attached patch works for me too, tnx!
Also works for me. Attention newbies, if you don't know how to patch, please go here: http://drupal.org/patch/apply
Looking at older 3.3 release shows a default $node=NULL in the function... works equally well.
patch works fine, thx!
Thanks for this, the patch worked for me as well. However have had some problems with the filefield_sources module on top of this!
Just as a matter of interest in the drupal developers community do modules which rely on other modules get notified before updates are released? I have come accross a few fire fighting releases and am a bit confused as to why these things get missed.
As a drupal newbie I work under a rule of thumb that security patches should be implemented ASAP but this sort of puts me off doing so.
patch above clears warnings (after a clear cache)
worked fine for me. thx!
patch works fine for me. thanks
I also found setting it to NULL worked equally well. NULL would probably be marginally more efficient too, although I don't know what the security implications are...
No more error in the watchdog after applying patch in #0.
You definitely don't want to use NULL for the $node -- either passing NULL to filefield_view_access in theme_filefield_item, or by defaulting $node to NULL in filefield_view_access -- because filefield_view_access doesn't check for a NULL node before dereferencing it.
The suggested fix at #0 worked, fixing the "warning: Missing argument 2 for filefield_view_access()" problem.
The patch at #0 fixes the error for me as well.
but when you edit a node with filefield you still get
warning: Missing argument 2 for filefield_edit_access() in sites\all\modules\filefield\filefield.module on line 486.
I got this as well and also tried out the patch and it fixed the warnings.
Same problem, initial patch seems to solve it.
Thanks for the patch.
Same issue. Confirming that the patch from #1 works as advertised.
committed to CVS after consulting with quicksketch - rolling a bugfix release shortly.
I got this warning too (for filefield_edit_access, NOT filefield_view_access) initially. Clearing the site cache fixed it. I think the cache for the menu items just needed flushing.
Attached patch worked for me.
Ack! I have a multisite drupal install with drupal 6.17 and I have updated to filefield 6.x 3.5 which contains the patch info listed above, but I am still getting the following warning error:
warning: Missing argument 2 for filefield_view_access(), called in /var/www/html/sites/all/modules/lightbox2/lightbox2.formatter.inc on line 262 and defined in /var/www/html/sites/all/modules/filefield/filefield.module on line 497.
I have done the following:
Put site in offline mode
delete -filefield from sites/all/moduldes/
upload - filefield 6.x 3.5
flush caches again
and I get the warning error.
If I revert back to filefield 3.3 it works fine, but then I get the security error.
dadamo: Lightbox needs to be updated. See #831774: Fix for missing argument error after upgrading to Filefield 6.x-3.5.
Sweet! That did the trick.
Most appreciated. I was so hung up on the filefield issue, I hadn't thought about looking into lightbox patches. I did look to see if there was a lightbox update.
ImageField was disabled after the upgrade... I had to re-enable it after updating FileField to 6.x-3.5
Automatically closed -- issue fixed for 2 weeks with no activity.
Drupal is a registered trademark of Dries Buytaert.