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.
Audio recording field is working to some extent for me, but I'm getting this error. Perhaps this is a new parameter to file create. I'll go and have a look at api.drupal for the first time ...
Missing argument 2 for file_create_filename(), called in :
/webroot/drupalsubdir/sites/all/modules/audiorecordingfield/audiorecordingfield.module on line 40
and defined in
/webroot/drupalsubdir/includes/file.inc on line 405
Dru-p
Comments
Comment #1
alphaXp CreditAttribution: alphaXp commentedHi, sorry for the delayed response.
Can you describe what you've done that resulted with this error massage?
Comment #2
Tebb CreditAttribution: Tebb commentedSorry alphaXp!
1) You are right, I should have explained in more detail at the time. I thought that this is something everyone using the newer version of ListenUp would be getting, but seems I am wrong.
2) I didn't note how I got the error.
3) I can't currently replicate the problem.
If I get the error again or remember how to replicate it, I will update this issue.
Until then it's up to you whether you want to close it or not.
Comment #3
alphaXp CreditAttribution: alphaXp commentedComment #4
Tebb CreditAttribution: Tebb commentedOK, now I can replicate it and worked out what is going on.
I get this error in 'Drupal recent log entries' when I have recorded audio and click the send button.
The browser displays the increasing percentage as the file is uploaded. It also displays "waiting for server response" and then "upload finished"
The error shown in the log is:
- type: PHP
- user: 'anonymous'
- referer: blank/empty
- location: http://www.domain.com/subdirectory/listenUp_file_receive?field_id=edit-f...
- severity: error
'audio recording' is the name of the CCK field.
Missing argument 2 for file_create_filename(), called in /pathtohttpdir/subdirectory/sites/all/modules/audiorecordingfield/audiorecordingfield.module on line 40 and defined in /pathtohttpdir/subdirectory/includes/file.inc on line 405.
This is because there is only 1 parameter supplied to the function which expects 2.
file_create_filename() takes a filename and a directory name.
The code only supplies the filename: 'timestamp'.wav
The player still *does not* work on my site, so I am continuing to work through the code.
Comment #5
pburk CreditAttribution: pburk commentedI have fixed this in the code. I will make a patch or release available when I am more comfortable with Drupal. This is what the new code looks like.
$candidate_name = 'lup_' . time() . '.wav';
// FIXED file_create_filename() was originally passed only one parameter. Needs two.
$new_name = file_create_filename($candidate_name, $upload_dir );
Comment #6
Tebb CreditAttribution: Tebb commentedHi PBurk.
I'm eventually getting back to this.
Any sign of the new release?
Comment #7
simonmd CreditAttribution: simonmd commentedGetting this error now as well....any news on the release? :(