I am still getting the following errors when I save certain nodes (not necessarily audio nodes):

* warning: Invalid argument supplied for foreach() in /home/.muckl/mydomain/domain.org/sites/www.domain.org.subdomain/modules/audio/getid3/audio_getid3.module on line 294.
* The following errors where encountered while reading the file's ID3 tags:
o Could not open file ""
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/.muckl/mydomain/domain.org/sites/www.domain.org.subdomain/modules/audio/getid3/audio_getid3.module on line 314.
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in/home/.muckl/mydomain/domain.org/sites/www.domain.org.subdomain/modules/audio/getid3/audio_getid3.module on line 316.

CommentFileSizeAuthor
#32 audio_273942.patch795 bytesdrewish
#27 273942.patch1.43 KBrobloach
#22 audio_getid3.zip3.33 KBpbarnett

Comments

robbt’s picture

This is the offending code. I'm not sure what is causing it but I am getting this error as well with 6.x dev version.
Why would this be getting referenced when there is nothing utilizing the audio component in the node.

/**
* Save the node's ID3 tags to the file. The tags will be saved and then
* reloaded so that the node reflects the allowed values.
*/
function _audio_getid3_save_to_file(&$node) {
$settings = audio_get_tag_settings();

// prepare a list of tags to be written to the file
$tags = array();
foreach ($node->audio_tags as $tag => $value) {
if (isset($settings[$tag]) && $settings[$tag]['writetofile']) {
$tags[$tag] = $value;
}
}

thomas23@drupal.org’s picture

same here

silvercat’s picture

Same..

edward.peters’s picture

I am getting exactly the same error messages. Can anyone help with this? Thanks!

dberzon’s picture

Priority: Normal » Critical

same here..help with this? Thanks!

scrman’s picture

Alas, I am having this problem also

thelocaltourist’s picture

same here

tiki’s picture

Has anyone else been able to figure out what is causing this and how it can be fixed? I've been playing around with the code (using the little php knowledge i have) and trying to fix the problem but so far i am back at square one. I am also still unable to attach audio to playlists and am getting an error there also. I will be willing to look at this again if anyone has any other tips.

iamnoskcaj’s picture

Same here.

For the record, I'm using the following versions:
Drupal = Drupal-6.3
Audio = audio-6.x-1.x-dev

To clarify though, this happens when saving a node of ANY TYPE.

When saving an audio node, the errors still happen, but the audio file seems to save/work.

However, I have found that getID3 fails on audio files that have embedded artwork. I also get a lot of timeout problems with big audio file uploads. I can pretty much only rely on this module to work if I upload the files to the server manually, then add/import them that way.

I'm VERY eager to get a stable/working version of this module for 6.x

I used this module when it was in it's infancy, back in 4.x if my memory serves me. It was wholly unstable back then – but there was a short time when I used it all the time.

I'd love to know what other Drupal developers / users are doing for Audio. Do they use this module? Are they hacking other stuff together, and avoiding this module?

Thanks for a great module – I just wish I could contribute something back. I only hope it is still being developed. When I looked at the Developers page, linked to on the module page, it looked like the latest commit was 6 weeks ago. I wish I were able to contribute something to this project, to help it move along. I was so excited when it came out a few years ago.

BTW, playlists don't work for me either.

yngens’s picture

same problem

thelocaltourist’s picture

Playlists also don't work for me.

yngens’s picture

any progress on this?

update: btw, this error is encompanied by another error message This file is not compatible with the Flash audio player. Flash can only play MP3 files with a sample rate of 11, 22 or 44KHz , which occurs on just opening node/add/audio page without submitting anything yet.

soj’s picture

same here...

9svn6’s picture

Yup i'm getting the same errors when publishing a Story or other node:

* warning: Invalid argument supplied for foreach() in /home/nine76/public_html/index/modules/audio/getid3/audio_getid3.module on line 294.
* The following errors where encountered while reading the file's ID3 tags:
Could not open file ""
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/nine76/public_html/index/modules/audio/getid3/audio_getid3.module on line 314.
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/nine76/public_html/index/modules/audio/getid3/audio_getid3.module on line 316.
dman’s picture

Guys....


  foreach ((array)$node->audio_tags as $tag => $value) {

and the world carries on...

yngens’s picture

dman, where exactly this should go to?

dman’s picture

in the middle of the function listed in #1
... although it might not be a 100% fix for people getting file not found, it eliminates useless complaints about empty data arrays, which solved things for me

inspiredearth’s picture

So is there an official fix for this, or is the somewhat vague one (vague, I think, for complete Drupal/PHP newbies) from dman the final word on this?

By the way dman, thanks for this tip. I'll see if it works on my system.

Cheers,

Jonathan

::UPDATE::
OK... So I've taken a look at dman's suggestion. It is not obvious to me just where to put this line of code. "In the middle of..." is not exact enough for me. Would someone who got this fix to work please past in here the modified function _audio_getid3_save_to_file(&$node) with the code from dman inserted in the correct place.

What I've done is replace the existing line that is very similar to the one dman posted. This fixed the first part of the error but not the rest, as follows:

    * The following errors where encountered while reading the file's ID3 tags:
          o Could not open file ""
    * warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/publish/public_html/cms/sites/all/modules/audio/getid3/audio_getid3.module on line 315.
    * warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/publish/public_html/cms/sites/all/modules/audio/getid3/audio_getid3.module on line 317.

I'd love to know how to sort the rest of it out, or whether I was meant to do something different from that line of code from dman.

Thanks,

Jonathan

inspiredearth’s picture

Perhaps this should be taken into consideration:

"THIS RELEASE IS TOTALLY BROKEN, IT IS BEING MADE AVAILABLE FOR TESTING PURPOSES ONLY." as found on http://drupal.org/node/28715/release

esbon’s picture

Hi, I am also waiting for a solution to this problem. It's scary when users are working on updating nodes and they see this message.

esbon’s picture

Hi could you please explain in more detail where to place this line of code? I put it where I thought it was, but the whole site went blank.
Thanks for helping

pbarnett’s picture

StatusFileSize
new3.33 KB

Fixed audio_getid3.module (6.x-1.x-dev version)

It's a vile hack and probably the programmatic equivalent of a Band-Aid on a bullet wound, but it gets rid of the error messages...

Could someone else test this and report back?

Pete.

thomas23@drupal.org’s picture

Thanks for that, pbarnett! I copied your file (#22) to /drupal/sites/all/modules/audio/getid3/ and saved a couple of test nodes. I haven't gotten the error message in question any more since than. Will keep an eye on it.

Cheers.

robloach’s picture

If I made a patch for this, would someone commit it so that we don't hit it again?

robloach’s picture

Status: Active » Reviewed & tested by the community
drewish’s picture

Status: Reviewed & tested by the community » Needs work

yeah a patch would be good.

robloach’s picture

Status: Needs work » Needs review
StatusFileSize
new1.43 KB

Not quite sure how that fixes it, but I'm not one to complain.

esbon’s picture

Audio feed still not working. When I preview the feed from Views I see all items, but when I go to the acutal feed page, I don't see anything.
Thanks for the wonderful module

drewish’s picture

give the -dev release a try. i just committed some fixes to clean up the way the uploads were processed.

drewish’s picture

Status: Needs review » Fixed

feel free to re-open if you're getting warnings on node save.

alaa’s picture

Status: Fixed » Active

still getting warning.

it is caused by _audio_getid3_save_to_file($node) being called in audio_getid3_nodeapi() regardless on node type.

shouldn't this apply to audio nodes only? as in

/**
 * Implementation of hook_nodeapi().
 */
function audio_getid3_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case 'insert':
    case 'update':
      // update the metadata in the file
      if ($node->type == 'audio') {
        _audio_getid3_save_to_file($node);
      }
      break;
  }
}
drewish’s picture

Status: Active » Fixed
StatusFileSize
new795 bytes

right you are. committed the attached to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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