When putting thumbs into a playlist, the path is created incorrectly. It uses a relative path and does not append the base_path() to the path it receives. This will cause images to not show up on anything that is not in the document root. The fix is simple.

On line 370 change:

'value' => $thumb,

To

'value' => base_path().$thumb,

Now when you view /node/1/xspf from a player that is located at something like /node/somewhere, the images will actually show up rather than be blank.

CommentFileSizeAuthor
#3 fix-image-patch.372622.3.patch863 bytesaaron
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

riyana56’s picture

Please post which code to change in the 6.x version please.

riyana56’s picture

Version: 5.x-1.20-beta1 » 6.x-1.x-dev

I have found the solution for this in 6.x.

In xspf_playlist\xspf_playlist_thumb\xspf_playlist_thumb.module go to line 162.

Change it from

      if (strstr($file->filemime, 'image')) {
        $thumbs[] = $file->filepath;
      }

to

      if (strstr($file->filemime, 'image')) {
        $thumbs[] = '/'. $file->filepath;
      }

In my scenario, merely adding the slash was enough to make the images no longer break.

aaron’s picture

Priority: Critical » Normal
FileSize
863 bytes

that should really be

$thumbs[] = url($file->filepath);

i'm not able to test atm though. but here's a patch if anyone wants:

crystaldawn’s picture

Is this issue still not fixed? Is the maintainer MIA?