Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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 CreditAttribution: deviantintegral commentedActually, this needs to be tested in the 6.x-1.x branch as well.
Comment #3
deviantintegral CreditAttribution: deviantintegral commentedI committed a 6.x-1.x version of this (well, a totally different solution) in d1f877a.