Closed (duplicate)
Project:
jPlayer
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
29 Sep 2011 at 12:53 UTC
Updated:
15 Aug 2016 at 03:04 UTC
Notice: Undefined variable: player_type in jplayer_sort_files() (line 195 of /.../sites/all/modules/jplayer/includes/jplayer.theme.inc).
I manually changed the jPlayer module from the theme you provided to Pink Flag (from the jPlayer website).
http://www.jplayer.org/latest/jPlayer.Pink.Flag.2.1.0.zip
When navigating into a node, I get the error above.
WORKAROUND:
Modify includes/jplayer.theme.inc near line 185 as follows:
if ($type == 'single') {
$item = array_shift($playlist);
$playlist = array();
$playlist[] = $item;
}
//CUSTOM - BEGIN
if (!isset($player_type)){
$player_type="";
}
//CUSTOM - END
return array('files' => $files, 'extensions' => implode(',', $extensions), 'playlist' => $playlist, 'type' => $player_type);
}
Thank you for the great module. I really appreciate all of your work.
Comments
Comment #1
marco_cruz commentedThanks a lot!
Comment #2
webadpro commentedFor the best solution, I would say please view: http://drupal.org/node/1192826
Comment #3
Z2222 commentedWhy is the other solution better?
(This one worked for me.)
Comment #4
scitoMarking this as duplicate of #1192826: Undefined variable: player_type in jplayer_sort_files() since this is issue is older and has a more complete patch.