I can't seem to get Audiofield to work properly with Filefield Sources. If I have the widget type on my field set to Audio Upload, then my field settings offer no FileField Sources options. For that matter, options from the Insert module are also unavailable, although I wouldn't need that with an audio file. If I change the widget type to File, then my Filefield Sources options are available, and I can select the options I want.

If I then change the widget type back to Audio Upload, the selections I made for Filefield Sources does seem to stick - when I create a node the sources options are there. But going back to edit the CCK field, again the Filefield Sources options are not available on the settings page.

Is this a bug or am I missing something?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tamerzg’s picture

Project: AudioField » FileField Sources
Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Component: Code » General

Moving this to Filefield soruces issue queue.
I implemented support for audiofield_widget via hook_filefield_sources_widgets(), but now getting following error:

Fatal error: Unsupported operand types in ...sites\all\modules\filefield_sources\filefield_sources.module on line 68

quicksketch’s picture

Could you link to your integration with AudioField? Is it in dev or something that I'd have to apply manually?

quicksketch’s picture

Title: Not working with Filefield Sources » Element #process functions overwritten (not working with Filefield Sources)
Project: FileField Sources » AudioField
Component: General » Code
Status: Active » Needs review
FileSize
1.69 KB

I tried out AudioField 7.x-1.x and found that the error you mentioned has been fixed in #1492558: Unsupported operand types fatal error on PHP 5.3 when other widget settings are not present. So at least the settings show up for FileField Sources on the widget settings form.

However AudioField still didn't work with FileField Sources because AudioField is removing all the existing #process callbacks. This is a stupid API change in Drupal 7, see #914792: Custom element properties entirely override default element info properties for some background.

Anyway, attached a patch that should help make the modules work together. You'll need to use the 7.x-1.x dev version of FileField Sources until 1.5 is out if you're using PHP 5.3.

michellezeedru’s picture

The patch in #3 worked for me (using AudioField 7.x-1.0-beta7 and FileField Sources 7.x-1.6). Thanks!

brockdray’s picture

I notice that it's been a while since this was posted, but I'm having the same problem. I'd like to use FileField Sources with AudioField. Is this patch still the solution? Any chance it's going to be built into a new update of AudioField? I'm currently using the latest versions of each of those modules.

Anonymous’s picture

Issue summary: View changes
Status: Needs review » Patch (to be ported)
Anonymous’s picture

Status: Patch (to be ported) » Fixed

Patch applied manually.

Status: Fixed » Closed (fixed)

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