Warning: Missing argument 2 for filefield_edit_access()  in filefield_edit_access() (line 486 of /Users/nate/Sites/drupal6/sites/all/modules/filefield/filefield.module).

If you are getting this error after upgrading to FileField 3.4, it's likely caused by FileField Sources, which also needs to be upgraded. See #829746: Warning: Missing argument 2 for filefield_edit_access() in filefield_edit_access() in the FileField Sources queue.

Comments

bengtan’s picture

Version: 6.x-3.x-dev » 6.x-3.4
Category: support » bug
Status: Fixed » Active

Reopening this ticket.

I get this warning message when I upgraded my site from Filefield 6.x-3.3 to 6.x-3.4. I am not using FileFIeld Sources.

fluxrider’s picture

i got no warnings at all , just a this version has been revoked in the available updates report . Uninstalled and reloaded 6.3.3 . the 6.3.4 version is still listed and downloadable though. hmmmm

bengtan’s picture

Version: 6.x-3.4 » 6.x-3.x-dev
Category: bug » support
Status: Active » Fixed

Sorry, I posted my issue in the wrong spot (I misread drupal warning messages). Reposted to #829856: warning: Missing argument 2 for filefield_view_access(). Please follow up there.

Thank you.

checker’s picture

In latest dev - no warning

sahuni’s picture

sorry not same version

sinasalek’s picture

I'm also getting this error on 3.5

quicksketch’s picture

@sinasalek: Do you have FileField Sources installed? If so, the error is being caused by that module.

Juan C’s picture

I got this warning upon updating to 3.5. (No FileField Sources installed):

warning: array_merge_recursive() [function.array-merge-recursive]: Argument #2 is not an array in /var/www/vhosts/example.com/httpdocs/includes/form.inc on line 1368.

quicksketch’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

emptyvoid’s picture

I have the most recent release July 1, 2010 the warning has returned.

Warning: Missing argument 2 for filefield_edit_access() in
nzcodarnoc’s picture

Version: 6.x-3.7 » 6.x-3.x-dev

I'm getting the following error with FileField 6.x-3.7

warning: Missing argument 2 for filefield_edit_access() in /[snip]/sites/all/modules/filefield/filefield.module on line 498.

When used with ImageField, but not using FileField Sources.

Everything seems to work OK despite the error.

To suppress the error I edited line 498 of the file in the error message above too:

function filefield_edit_access($type_name, $field_name = '') {

and cleared my caches.

danrasband’s picture

Version: 6.x-3.x-dev » 6.x-3.7
Status: Closed (fixed) » Needs work

I'm also getting the same error with version 3.7 and imagefield.

quicksketch’s picture

Status: Needs work » Postponed (maintainer needs more info)

As far as I know there are no problems with the current release of FileField/ImageField/Filefield Sources as long as you are running the current releases. It's probably caused by another module calling the function incorrectly. If you can provide steps to reproduce from a fresh installation of Drupal I'll have a look.

checker’s picture

I tested it with FileField Sources and without FileField Sources and i could not find any problems. I tried it also in combination with FileField Paths.

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Please reopen if this problem can be reproduced. As far as I've tested, this problem no longer exists in the current versions.

nzcodarnoc’s picture

Hi there,

I'm experiencing this problem.

My installed/available modules are:

 Package                    Name                                                       Type    Status         Version        
 Administration             Administration menu (admin_menu)                           Module  Enabled        6.x-1.5        
 CCK                        Content (content)                                          Module  Enabled        6.x-2.7        
 CCK                        Content Copy (content_copy)                                Module  Not installed  6.x-2.7        
 CCK                        Content Permissions (content_permissions)                  Module  Not installed  6.x-2.7        
 CCK                        Fieldgroup (fieldgroup)                                    Module  Not installed  6.x-2.7        
 CCK                        FileField (filefield)                                      Module  Enabled        6.x-3.7        
 CCK                        FileField Meta (filefield_meta)                            Module  Not installed  6.x-3.7        
 CCK                        Flexi Field (flexifield)                                   Module  Enabled        6.x-1.0-alpha5 
 CCK                        FlexiField Display Contexts (flexifield_displaycontexts)   Module  Enabled        6.x-1.0-alpha5 
 CCK                        FlexiField Fieldgroup Integration (flexifield_fieldgroup)  Module  Not installed  6.x-1.0-alpha5 
 CCK                        FlexiField FileField Integration (flexifield_filefield)    Module  Enabled        6.x-1.0-alpha5 
 CCK                        ImageField (imagefield)                                    Module  Enabled        6.x-3.7        
 CCK                        IMCE Image (imceimage)                                     Module  Enabled        6.x-1.0-beta2  
 CCK                        Node Reference (nodereference)                             Module  Not installed  6.x-2.7        
 CCK                        Number (number)                                            Module  Enabled        6.x-2.7        
 CCK                        Option Widgets (optionwidgets)                             Module  Enabled        6.x-2.7        
 CCK                        Text (text)                                                Module  Enabled        6.x-2.7        
 CCK                        User Reference (userreference)                             Module  Not installed  6.x-2.7        
 Core - optional            Aggregator (aggregator)                                    Module  Not installed  6.17           
 Core - optional            Blog (blog)                                                Module  Not installed  6.17           
 Core - optional            Blog API (blogapi)                                         Module  Not installed  6.17           
 Core - optional            Book (book)                                                Module  Not installed  6.17           
 Core - optional            Color (color)                                              Module  Enabled        6.17           
 Core - optional            Comment (comment)                                          Module  Enabled        6.17           
 Core - optional            Contact (contact)                                          Module  Not installed  6.17           
 Core - optional            Content translation (translation)                          Module  Not installed  6.17           
 Core - optional            Database logging (dblog)                                   Module  Enabled        6.17           
 Core - optional            Forum (forum)                                              Module  Not installed  6.17           
 Core - optional            Help (help)                                                Module  Enabled        6.17           
 Core - optional            Locale (locale)                                            Module  Not installed  6.17           
 Core - optional            Menu (menu)                                                Module  Enabled        6.17           
 Core - optional            OpenID (openid)                                            Module  Not installed  6.17           
 Core - optional            Path (path)                                                Module  Enabled        6.17           
 Core - optional            PHP filter (php)                                           Module  Not installed  6.17           
 Core - optional            Ping (ping)                                                Module  Not installed  6.17           
 Core - optional            Poll (poll)                                                Module  Not installed  6.17           
 Core - optional            Profile (profile)                                          Module  Not installed  6.17           
 Core - optional            Search (search)                                            Module  Enabled        6.17           
 Core - optional            Statistics (statistics)                                    Module  Not installed  6.17           
 Core - optional            Syslog (syslog)                                            Module  Not installed  6.17           
 Core - optional            Taxonomy (taxonomy)                                        Module  Enabled        6.17           
 Core - optional            Throttle (throttle)                                        Module  Not installed  6.17           
 Core - optional            Tracker (tracker)                                          Module  Not installed  6.17           
 Core - optional            Trigger (trigger)                                          Module  Not installed  6.17           
 Core - optional            Update status (update)                                     Module  Enabled        6.17           
 Core - optional            Upload (upload)                                            Module  Not installed  6.17           
 Core - required            Block (block)                                              Module  Enabled        6.17           
 Core - required            Filter (filter)                                            Module  Enabled        6.17           
 Core - required            Node (node)                                                Module  Enabled        6.17           
 Core - required            System (system)                                            Module  Enabled        6.17           
 Core - required            User (user)                                                Module  Enabled        6.17           
 Development                Devel (devel)                                              Module  Not installed  6.x-1.20       
 Development                Devel generate (devel_generate)                            Module  Not installed  6.x-1.20       
 Development                Devel node access (devel_node_access)                      Module  Not installed  6.x-1.20       
 Development                Performance Logging (performance)                          Module  Not installed  6.x-1.20       
 Image                      Image (image)                                              Module  Enabled        6.x-1.0-beta5  
 Image                      Image Attach (image_attach)                                Module  Not installed  6.x-1.0-beta5  
 Image                      Image Gallery (image_gallery)                              Module  Enabled        6.x-1.0-beta5  
 Image                      Image Import (image_import)                                Module  Not installed  6.x-1.0-beta5  
 Image                      ImageMagick Advanced Options (image_im_advanced)           Module  Not installed  6.x-1.0-beta5  
 ImageCache                 ImageAPI (imageapi)                                        Module  Not installed  6.x-1.8        
 ImageCache                 ImageAPI GD2 (imageapi_gd)                                 Module  Not installed  6.x-1.8        
 ImageCache                 ImageAPI ImageMagick (imageapi_imagemagick)                Module  Not installed  6.x-1.8        
 ImageCache                 ImageCache (imagecache)                                    Module  Not installed  6.x-2.0-beta10 
 ImageCache                 ImageCache UI (imagecache_ui)                              Module  Not installed  6.x-2.0-beta10 
 Node Hierarchy             Node Hierarchy (nodehierarchy)                             Module  Enabled        6.x-1.3        
 Node Hierarchy             Node Hierarchy Views Embed (nodehierarchy_views)           Module  Not installed  6.x-1.3        
 Origin Design              Insight Tweaks (insight)                                   Module  Not installed  6.x-0.1-dev    
 Other                      Advanced help (advanced_help)                              Module  Enabled        6.x-1.2        
 Other                      Advanced help example (help_example)                       Module  Not installed  6.x-1.2        
 Other                      AHAH Response (ahah_response)                              Module  Enabled        6.x-1.2        
 Other                      FCKeditor (fckeditor)                                      Module  Enabled        6.x-2.1        
 Other                      IMCE (imce)                                                Module  Enabled        6.x-2.0-beta3  
 Other                      Pathauto (pathauto)                                        Module  Enabled        6.x-1.3        
 Other                      Token (token)                                              Module  Enabled        6.x-1.13       
 Other                      Token actions (token_actions)                              Module  Not installed  6.x-1.13       
 Other                      TokenSTARTER (tokenSTARTER)                                Module  Not installed  6.x-1.13       
 Services                   Services (services)                                        Module  Enabled        6.x-2.2        
 Services - authentication  Key Authentication (services_keyauth)                      Module  Enabled        6.x-2.2        
 Services - servers         AMFPHP (amfphp)                                            Module  Enabled        6.x-1.0-beta2  
 Services - servers         XMLRPC Server (xmlrpc_server)                              Module  Disabled       6.x-2.2        
 Services - services        Comment Service (comment_service)                          Module  Enabled        6.x-2.2        
 Services - services        File Service (file_service)                                Module  Enabled        6.x-2.2        
 Services - services        Menu Service (menu_service)                                Module  Enabled        6.x-2.2        
 Services - services        Node Resource (node_resource)                              Module  Enabled        6.x-2.2        
 Services - services        Node Service (node_service)                                Module  Enabled        6.x-2.2        
 Services - services        Search Service (search_service)                            Module  Enabled        6.x-2.2        
 Services - services        System Service (system_service)                            Module  Enabled        6.x-2.2        
 Services - services        Taxonomy Service (taxonomy_service)                        Module  Enabled        6.x-2.2        
 Services - services        User Service (user_service)                                Module  Enabled        6.x-2.2        
 Services - services        Views Service (views_service)                              Module  Enabled        6.x-2.2        
 User interface             IMCE Wysiwyg API bridge (imce_wysiwyg)                     Module  Enabled        6.x-1.1        
 User Interface             SWFAddress (swfaddress)                                    Module  Enabled        6.x-1.x-dev    
 User interface             Wysiwyg (wysiwyg)                                          Module  Enabled        6.x-2.1        
 Views                      Views (views)                                              Module  Enabled        6.x-2.11       
 Views                      Views exporter (views_export)                              Module  Enabled        6.x-2.11       
 Views                      Views UI (views_ui)                                        Module  Enabled        6.x-2.11       
 Other                      Bluemarine (bluemarine)                                    Theme   Disabled       6.17           
 Other                      Chameleon (chameleon)                                      Theme   Disabled       6.17           
 Other                      Garland (garland)                                          Theme   Enabled        6.17           
 Other                      Marvin (marvin)                                            Theme   Disabled       6.17           
 Other                      Minnelli (minnelli)                                        Theme   Disabled       6.17           
 Other                      Pushbutton (pushbutton)                                    Theme   Disabled       6.17   
danrasband’s picture

I think this may have to do with flexifield.

See http://drupal.org/node/853742#comment-3210312

I uploaded a patch there. Let me know if it works. (Note: you must deactivate and reactivate the flexifield module for changes to take place.)

Sera’s picture

#18
This is not the (only) solution. I have no flexifield installed and also have the problem:

warning: Missing argument 2 for filefield_edit_access() in [..]/sites/all/modules/filefield/filefield.module on line 498.

edit says:
Okay, got the problem. Had imagefield 3.4 installed. Upgrading to 3.7 and warning disapeared. :)