I installed this module to upload audio files and be able to play it. I also installed the Wordpress theme audio player because the other ones doesn't seen to work out with this module.

My problem though is that when I am creating a new content, that warning message shows. I tried to look for a solution but I couldn't find anything, that's why I am posting this. Has someone fix this?

CommentFileSizeAuthor
#13 progress_indicator-1433326-13.patch455 bytesAnonymous (not verified)

Comments

pcoloma’s picture

I have the same issue, but because I have fiddle with different modules (Media), removed the fields from the content type and added it back in, I'm not sure if the fault belongs to the module. Anyway as a temporary fix, because I don't have use/and support for the progress bar. I just commented the line 467 in the code.
Hope this helps.

marloncastrillo’s picture

thanks pcoloma, but I may be a little slow and still don't get how to fix this. So I went to the file and a see this in line 467:

459 // Essentially we use the managed_file type, extended with some enhancements.
460 $element_info = element_info('managed_file');
461 $element += array(
462 '#type' => 'managed_file',
463 '#upload_location' => file_field_widget_uri($field, $instance),
464 '#upload_validators' => file_field_widget_upload_validators($field, $instance),
465 '#value_callback' => 'file_field_widget_value',
466 '#process' => array_merge($element_info['#process'], array('file_field_widget_process')),
467 '#progress_indicator' => $instance['widget']['settings']['progress_indicator'],
468 // Allows this field to return an array instead of a single value.
469 '#extended' => TRUE,
470 );

Honestly I don't understand a coma of this. I kinda have an idea but I am not a programmer so I don't know what's going on. I think what its doing on line 467 is creating an instance of [widget][settings] and searching for [progress_indicator] and since it can't find it then displays the error. But I can't fix it.

I tried removing the Audio field type from the content type and adding it again but is giving the same error.

marloncastrillo’s picture

I tried doing what #1 told me again and the error is not showing any more. I upload a file and still not showing (at least for now) This is exactly what I did in case someone else have the same problem:

1 Click content type
2 Manage Field for my custom content type
3 I went to the audio field and change the Widget type from Audio Upload to File, click save
4 I save the content type
5 Open the content type again
6 Change the widget type from File to Audio upload, click save
7 Saved the content type

After that the error is not showing anymore. Now I don't know what the problem is exactly. I went to the same file on line 467 to see if there was something different and is the exact the thing, so I don't know what got change but the error is not showing any more.

Hope this helps someone else with the same problem

jesse_kwac’s picture

I can confirm #3 works. This first happened when I upgraded the Widgets module to version 7.x-1.0-beta5.

snevins’s picture

Rather than commenting out a line from the file module - a core module - I found that un-commenting line 48 ('progress_indicator' => 'throbber',) in audio.field.inc also resolves the problem and avoids messing up other modules like image that use the file module.

You'll need to clear your cache to see the change. To do that go to admin/config/development/performance and click on the "clear all caches" button.

heresh’s picture

I do what snevins said and the error gone away
Thanksssssssssssss!

marloncastrillo’s picture

Thanks snevins, so far I haven't get the same error, but if it happen again, I'll try your solution.

multpix’s picture

Title: Notice: Undefined index: progress_indicator in file_field_widget_form() » Notice: Undefined index: progress_indicator in file_field_widget_form() (line 467 of C:\wamp\www\test\modules\file\file.field
Version: 7.x-1.x-dev » 7.x-1.0-beta4
Status: Reviewed & tested by the community » Active

uncomment line 48 in audio.field.inc
'progress_indicator' => 'throbber',
worked for me)
Thanks

wOOge’s picture

Still a problem — #3 does help, but the error returns when you open the content type and re-save it without changing the widget type.

Note: Using the dev version: 7.x-1.x-dev (2011-Apr-18) — seems to fix the problem.

music_life_love’s picture

Thank you so much #3 :)

kap316’s picture

Cheers #3 Appreciated!

deadtech@gmail.com’s picture

#3 worked for me so far...

Anonymous’s picture

Title: Notice: Undefined index: progress_indicator in file_field_widget_form() (line 467 of C:\wamp\www\test\modules\file\file.field » Notice: Undefined index: progress_indicator in file_field_widget_form()
Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new455 bytes

Here's a patch that simply un-comments the progress_indicator line from audio.field.inc.

bentedder’s picture

Thanks, worked for me!

mkadin’s picture

Status: Needs review » Reviewed & tested by the community

Agreed. Uncommenting this line clears up the problem. RTBC.

gagarine’s picture

Title: Notice: Undefined index: progress_indicator in file_field_widget_form() (line 467 of C:\wamp\www\test\modules\file\file.field » Notice: Undefined index: progress_indicator in file_field_widget_form()
Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Active » Reviewed & tested by the community

#13 working for me.

gagarine’s picture

This is still a problem with the new version?

sprite’s picture

Issue summary: View changes

I can report that as of 2014/09/11 the problem reported here still exists.

I created a new clean Drupal 7.31 install on a XAMPP local machine web server.

I then installed audiofield 7.x-1.0-beta4 via the modules page.

I then create a custom content type and added a field to it for uploading mp3 files.

When I tried to create a node of this type, with the audiofield in it, the following warning appears:

Notice: Undefined index: progress_indicator in file_field_widget_form() (line 480 of C:\__sites\www.test.lcl\modules\file\file.field.inc).

It is odd that the developers of this module haven't taken notice of the problem over the course of years.

It is odd that the developers of this module don't appear to have commented here about this problem over the course of years.

ws.agency’s picture

Fixed with latest applied patch

ws.agency’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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