If you configure a new markup field item but dont fill it with text for the markup then the 'value' of the item isnt saved. When it tries to render the #markup 'value' isnt set. This patch tests for the 'value's existence before running it through check_markup(). Presto chango, notice squashed!

This patch graciously sponsored by Second Melody

CommentFileSizeAuthor
#1 markup_value_notice.patch985 bytesmichaelfavia

Comments

michaelfavia’s picture

StatusFileSize
new985 bytes

forgot patch. sorry for bugspam.

anybody’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (outdated)

Thank you - anyway I think this is outdated. The code in latest .dev is:

/**
 * Implements hook_field_widget_form().
 */
function markup_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  // Setting default field value if it is not set yet.
  if (!isset($field['settings']['markup']['value'])) {
    $field['settings']['markup']['value'] = '';
  }
  $element += array(
    'markup' => array(
      '#markup' => markup_translate_instance($field, $instance),
    ),
  );
  return $element;
}

Also you can't set your own patch RTBC.

Please reopen if the issue still exists. Thanks a lot :)