Closed (fixed)
Project:
jPlayer
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2011 at 23:21 UTC
Updated:
8 Jun 2012 at 20:41 UTC
Trying to display the player when there are no items in the field causes an Undefined variable: player_type in jplayer_sort_files() error, and also uselessly adds the player's JavaScript to the page. The following patch solves those issues at their root by not trying to display the player when there are no items in the field to play.
#1192826: Undefined variable: player_type in jplayer_sort_files() targets the same error message but seems to address the problem in the case of Views.
| Comment | File | Size | Author |
|---|---|---|---|
| jplayer-no-items.patch | 1.16 KB | david lesieur |
Comments
Comment #1
deviantintegral commentedThanks for the patch. I committed it in 135b2ee and added a small followup in fa75e5f to make sure the field label was hidden as well.
Comment #2
deviantintegral commentedActually, this needs to be tested in the 6.x-1.x branch as well.
Comment #3
deviantintegral commentedI committed a 6.x-1.x version of this (well, a totally different solution) in d1f877a.