content_taxonomy_allowed_values() uses theme_optionwidgets_none() to theme the label for empty values added for non required fields, but that only supports widgets provided by the content module itself.

The attached patch fixes this. It's against the D6 branch of the content_taxonomy module.

CommentFileSizeAuthor
content_taxonomy.theme_none.patch1.66 KBmarkus_petrux

Comments

mh86’s picture

Status: Needs review » Fixed

I committed the patch with 2 changes:
- moving the theme function and it's hook into the content_taxonomy_options.module
- instead of adding 'N/A' to all radios, only to optional radios (so same behavior as before)

Thanks for the patch!

markus_petrux’s picture

hmm... it seems to me that your fix adds '--None--' to required select lists.

Maybe something like the following?

  // Add blank option when field is not required, it is not multiple and widget type is radios or single select.
  if (!$field['required'] && !$field['multiple'] && in_array($field['widget']['type'], array('content_taxonomy_options', 'content_taxonomy_select'))) {
    $options = array('' => theme('content_taxonomy_options_widgets_none', $field)) + $options;
  }

Status: Fixed » Closed (fixed)

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