Saving products produces this error message:
Notice: Undefined index: text_processing in _text_sanitize() (line 320 of /Users/joachim/Sites/greaves-drupal/modules/field/modules/text/text.module). Backtrace:
_text_sanitize(Array, 'und', Array, 'value') text.module:264
text_field_formatter_view('commerce_product', Object, Array, Array, 'und', Array, Array) field.default.inc:210
field_default_view('commerce_product', Object, Array, Array, 'und', Array, 'default', NULL) field.attach.inc:209
_field_invoke('view', 'commerce_product', Object, 'default', NULL, Array) field.attach.inc:385
_field_invoke_default('view', 'commerce_product', Object, 'default', NULL, Array) field.module:899
field_view_field('commerce_product', Object, 'commerce_eu_vat_rate', 'default', 'en') commerce_product_reference.module:330
This is because the text_default formatter that we're setting as our default requires an instance setting:
/**
* Implements hook_field_info().
*
* Field settings:
* - max_length: the maximum length for a varchar field.
* Instance settings:
* - text_processing: whether text input filters should be used.
* - display_summary: whether the summary field should be displayed.
* When empty and not displayed the summary will take its value from the
* trimmed value of the main text field.
*/
function text_field_info() {
return array(
'text' => array(
'label' => t('Text'),
'description' => t('This field stores varchar text in the database.'),
'settings' => array('max_length' => 255),
'instance_settings' => array('text_processing' => 0),
'default_widget' => 'text_textfield',
'default_formatter' => 'text_default',
),
Comments
Comment #1
joachim commentedIt's worse that that it turns out:
That expects $column to be only one of two things. And this is called by text_field_formatter_view(), with:
However, our $item won't have that column because our field doesn't work that way.
Hence I suspect that we can't use the formatter from text module at all, because it expects field schema columns which we don't have.
Comment #2
joachim commentedThe text formatter isn't going to cut it at all. Let's add a dedicated one.
Comment #3
joachim commentedFixed.
Rolling a new release.