If a preset is deleted and is still selected as the chosen preset on a field, a Drupal error will be thrown.

The attached patch checks if the preset exists. If it doesn't, a message is displayed on the field formatter page rather than causing a Drupal error.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ron_s created an issue. See original summary.

Berdir’s picture

Status: Needs review » Needs work
+++ b/jw_player.module
@@ -365,7 +365,16 @@ function jw_player_field_formatter_settings_summary($field, $instance, $view_mod
+    ));
+    $summary['source'] = t('');
+    return $summary;

t() should not be used with an empty string.

ron_s’s picture

Status: Needs work » Needs review
FileSize
661 bytes
1.15 KB

New version for review.

  • Berdir committed eaa3e71 on 7.x-2.x authored by ron_s
    Issue #2725545 by ron_s: Add error check for deleted preset
    
Berdir’s picture

Status: Needs review » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.