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.
This might be an edge case scenario as I am using AmazonS3 to serve the audio file with private signed urls. This appends a querystring to the uri when file_create_url() is used. e.g.
media.s3.amazonaws.com/audio/audiofile.mp3?AWSAccessKeyId=XXXX&Expires=XXXX&Signature=XXXX
This module uses:
$audiofile = file_create_url($item['uri']);
$info = pathinfo($audiofile);
$op = $info['extension'];
which results in $op = mp3?AWSAccessKeyId=XXXX&Expires=XXXX&Signature=XXXX
Later in audiofield_get_player() we have
$variable_name = 'audiofield_audioplayer' . ($op == 'mp3' ? '' : "_$op");
which obviously cannot load the variable and therefor the player is not embedded.
Suggest using the original item['uri'] for pathinfo to get the file extension.
Comment | File | Size | Author |
---|---|---|---|
#1 | audiofield-file_querystring-2465879-1.patch | 947 bytes | tinker |
Comments
Comment #1
tinker CreditAttribution: tinker commentedComment #2
Anonymous (not verified) CreditAttribution: Anonymous at Websolutions Agency commentedTested, patch to be ported.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous at Websolutions Agency commentedComment #4
Anonymous (not verified) CreditAttribution: Anonymous at Websolutions Agency commentedComment #5
ws.agency CreditAttribution: ws.agency at Websolutions Agency commentedPatch review and tested.. to be ported.
Comment #6
ws.agency CreditAttribution: ws.agency at Websolutions Agency commented