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

alphaXp’s picture

Hi, sorry for the delayed response.

Can you describe what you've done that resulted with this error massage?

Tebb’s picture

Status: Closed (fixed) » Active

Sorry 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.

alphaXp’s picture

Status: Active » Closed (fixed)
Tebb’s picture

OK, 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.

pburk’s picture

Assigned: Unassigned » pburk

I 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 );

Tebb’s picture

Hi PBurk.

I'm eventually getting back to this.

Any sign of the new release?

simonmd’s picture

Getting this error now as well....any news on the release? :(