Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After last update, audio field is not displayed because the "display" item is set to 0.
just changing to 1 in the database solves the problem
Comments
Comment #1
Stado CreditAttribution: Stado commentedwhich db please? could you be more specific for newbies like me? :)
many thanks in advance
SORRY, just found it. but isn't it strange that the it is set to "0" by default when uploading a new file?
Thanks a million anyway!
Comment #2
egarias CreditAttribution: egarias commentedThe row is "field_audio_display" in the table "field_data_field_audio" that is generated after defining the field_audio in node cck.
When uploading other media, the "$file->display" is mostly if not allways set to 1. Setting display =0, result in no display in node view.
But this is a change in this new release of Audiofeld, the previous one was working Ok.
Comment #3
Stado CreditAttribution: Stado commentedis there a way to force a default value in this table?
Comment #4
egarias CreditAttribution: egarias commentedThe default value in table is already set to 1. So somewhere in the code this value is set to 0.
Please this make this module UNNUSABLE! I have to manually change this value in the database
Comment #5
Stado CreditAttribution: Stado commentedfound this in audio.field.inc:
// Add display_field setting to field because file_field_widget_form() assumes it is set.
$field['settings']['display_field'] = 0;
changed it to "1" and ... no effect :(
Comment #6
tamerzg CreditAttribution: tamerzg commentedIt seems issue was occurring only when "Enable Display field" checkbox is checked in field settings, which then shows this option as checkbox to user during the file upload. There was a bug with latest audiofield which overwrote this checkbox and therefore its value would remain zero.
You can take beta8 where this is fixed.
This fix probably needs backport for D6 version as well.
Comment #7
Stado CreditAttribution: Stado commentedi confirm that beta 8 works fine. thanks!
Comment #8
egarias CreditAttribution: egarias commentedWorks for me also!
Thanks
Comment #9
ws.agency CreditAttribution: ws.agency at Websolutions Agency commentedPatch will be ported.
Comment #10
ws.agency CreditAttribution: ws.agency at Websolutions Agency commentedPatch ported together with another patches.