hey ive just installed the 6.x-1.0-alpha5 version of flexifield and the concept for this module is perfect for my needs.

i have created a project_info content type with a single value image field and a text field, and a project_page content type which uses flexifield to pull in the project_info content type. however when i try to upload the image from within a project_page it throws out the warning message:

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

i presume it has something to do with filefield not receiving the correct field name for the imagefield as it is 'embedded' inside the flexifield field.

i searched for is warning message and found the same issue posted in the filefield issue queue (the last post includes a module list which includes flexifield).

can anyone help solve this please?

thanks

CommentFileSizeAuthor
#1 flexifield_filefield.module.patch555 bytesdanrasband
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

danrasband’s picture

Here is a patch that worked for me: (You'll have to reinstall or at least deactivate and then reactivate the flexifield module)

P.S. This is the first patch I've created, so if it doesn't work, all you have to do is change line 18 from:

'access arguments' => array(3),

to

'access arguments' => array(2, 3),

then deactivate and activate the flexifield module.

georgina_marauder’s picture

Fixed! Thanks so much :)

Murz’s picture

Thanks! Patch solved problem for me too!

danrasband’s picture

Status: Active » Needs review
spesso’s picture

Thanks! It worked for me.

K-Max’s picture

Priority: Normal » Major
Status: Needs review » Needs work

While the code in #1 works, if I avoid using ahah and just click Save without using ahah (example: the not clicking the upload button in a flexifield that has a imagefield and submitting as is), Everything except the flexifield data is saved with the node.

I'll look into this a bit more but, in the meantime, try adding a node without using any ahah submissions and see if it works or not as I haven't have a chance to test on a generic setup.

K-Max’s picture

Title: warning: Missing argument 2 for filefield_edit_access() » filefield.module updates on filefield_edit_access() breaks flexifield saving.

Changing issue to make it simpler to follow. ;)

K-Max’s picture

Version: 6.x-1.0-alpha5 » 6.x-1.x-dev

FYI - I had downgraded these modules to these versions and it appears to mitigate the problem down to the data in the imagefields not saving. So in the meantime, make sure you ARE using the upload buttons before saving.

As mentioned, make sure to deactivate and reactivate replaced modules.

In the end, it could be non-flexifield related... but something definitely broke since flexifield was last updated. Just out of time at the moment to test.

- CCK 6.x-2.6
- FileField 6.x-3.3
- Imagefield 6.x-3.3
- AHAH Response 6.x-1.2
- Flexifield 6.x-1.x-dev

Good luck!

willhowlett’s picture

Having just updated Filefield to 3.7 I'm now experiencing this issue. The patch above does not seem to have worked for me.

Edit: Sorry, I was mistaken, the patch did work :)

stefan81’s picture

Patch #1 works fine, thanks

maximer’s picture

When will this path be added to the new release?

sdemi’s picture

Status: Needs work » Reviewed & tested by the community

This needs to go into 6.x-1.x-dev ASAP

hanoii’s picture

clearing cache menu should do it, this should include a flexifield_update_N on the install file to clear menu cache automatically in my opinion.

hanoii’s picture

Tried it and it worked fine! +1

_Jay’s picture

Thanks! The patch did not apply to my dev version but it worked when I changed the code manually.

deepakjoshi’s picture

Version: 6.x-1.x-dev » 6.x-1.0-alpha5

Above patch not working for me ; i have used ImageField 6.x-3.10 , FlexiField 6.x-1.0-alpha5 and FielField 6.x-3.10.

Please suggest me to remove warning error "Warning: Missing argument 2 for filefield_edit_access() in filefield_edit_access()"

dg888’s picture

#6 from http://drupal.org/node/540852, the fix applied on sites/all/modules/flexifield/modules/filefield/flexifield_filefield.module, line 12 worked fine for me after flushing the caches
I have the same configuration than you : ImageField 6.x-3.10 , FlexiField 6.x-1.0-alpha5 and FielField 6.x-3.10.

Cheers

Webdesign // Webdevelopment
CreativeGreg.com

squarecandy’s picture

works for me.

Anuprita’s picture

Worked for me!!!

Thanks a lot "danrasband" for the patch !!!!

Thanks,
Anu