Hi there.
We are loving the possibilities that this module offers, but we've been having major headaches trying to get this to play nicely.

First question is which version should we be using?
On the module page it suggests version 0.12 is the latest official release : http://drupal.org/project/xspf_playlist

We then realised this doesn't include some of the views integration menioned here http://drupal.org/node/278260

Looking at the 'View all releases' shows a version 1.14 : http://drupal.org/node/150130/release

But after checking this out of the CVS we realised that the xspf_playlist_thumb.install file redefined the xspf_playlist_install() function causing errors. I tried renaming the function and it installed OK, but visiting admin/settings/xspf-playlist gave us a blank page and a fatal error in the logs:

PHP Fatal error:  Call to undefined function xspf_playlist_content_fields() ... ...in... /sites/all/modules/xspf_playlist/xspf_playlist_node/xspf_playlist_node.module on line 371

Looking at the CVS repository revealed a version 1.15 - in which the install and uninstall functions in the xspf_playlist_thumb.install file have been renamed to xspf_playlist_thumb_install() and xspf_playlist_thumb_uninstall() respectively, which seems to make sense.

However, upon installing version 1.15 I get these warnings:

warning: array_filter() [function.array-filter]: The first argument should be an array in /www/drupal5/sites/all/modules/xspf_playlist/xspf_playlist_node/xspf_playlist_node.install on line 19.
warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/drupal5/includes/database.mysql.inc on line 218.

These don't seem too much of an issue as they appear to be involved in importing previous settings in the xspf_playlist_node_import_settings() function, and we are not importing any settings.

Anyhow - I couldn't find any info on this, and have been looking for a couple of days, so felt it time to post here in the hope that somone could clarify which version we should be using.

Any pointers?

Comments

McCool’s picture

Title: Which version should we be using? » Install warnings and undefined function xspf_playlist_content_fields()

Update:

I uninstalled the modules, completely removed the xspf_playlist folder and ran update.php.
I then double checked there were no realated tables in the databse.
Did a fresh CVS checkout of version 1.15.
Installed just the xspf_playlist module - ran update.php just in case.
Installed just the xspf_playlist_thumbs module - ran update.php just in case.
Installed just the xspf_playlist_node module - and got the following warnings again:

warning: array_filter() [function.array-filter]: The first argument should be an array in /var/www/vhosts/drupal5/sites/all/modules/xspf_playlist/xspf_playlist_node/xspf_playlist_node.install on line 19.
warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/drupal5/includes/database.mysql.inc on line 218.

However - I can now access the admin/settings/xspf-playlist page.

Forgot to mention this is Drupal 5.10 on PHP 5.2.6 / MySQL 5.0.58 Apache / RedHat.

I'll continue the investigation and post results back here soon.

ecoluke’s picture

I work with McCool (above) and have generated a repeatable failure point in setting up XSPF.

Once it is set up as above when you navigate to the admin/settings/xspf-playlist page you have the option to start setting up node playlists by clicking on a content type and pressing "save". This works.

Then if you select the XSPF to be generated from attached files - this also works. So if I select a content type which has attachments enabled and has an .flv attached then look at the XSPF generated from the node it looks ok - everything's fine so far.

The problem is if you select "from CCK content fields" instead of "from attached files" and press save - then it dies and admin/settings/xspf-playlist is just a blank white page.

This is a problem because we want to set up playlists for nodes generated from incoming feeds. I have set up a content type with a "3rd party embed video" CCK field and have mapped incoming youtube videos to that feed - and it works - but can't generate an XSPF playlist from them because the XSPF node / CCK fields bit seems to kill everything when it's enabled.

Any help would be much appreciated!

Luke

P.S. The old XSPF 0.12 would generate the playlists from the CCK field - although somewhat bizarrely it would only insert the youtube ID into the playlist, rather than the full content of that field. So if the field had the value "http://www.youtube.com/watch?v=ryH1TB4gEUY" inserted into it then the playlist would just have: ryH1TB4gEUY - and the JWPlayer obviously didn't like that! Has anyone experienced this or can anyone think why this is happening or how we could fix it?

randomuser’s picture

+1

arthurf’s picture

@ecoluke - do you have the code for youtube? I can make an additional helper module which takes care of this