Commit 4777a2dc authored by Dries's avatar Dries

Issue #1974632 by amateescu: Wrong message displayed by field_ui_inactive_message().

parent 0deed2a5
......@@ -67,14 +67,14 @@ function field_ui_inactive_message($entity_type, $bundle) {
$inactive_instances = field_ui_inactive_instances($entity_type, $bundle);
if (!empty($inactive_instances)) {
$field_types = field_info_field_types();
$widget_types = field_info_widget_types();
foreach ($inactive_instances as $field_name => $instance) {
$list[] = t('%field (@field_name) field requires the %widget_type widget provided by %widget_module module', array(
$field = field_info_field($instance['field_name']);
$list[] = t('%field (@field_name) field requires the %field_type field type provided by %field_type_module module', array(
'%field' => $instance['label'],
'@field_name' => $instance['field_name'],
'%widget_type' => isset($widget_types[$instance['widget']['type']]) ? $widget_types[$instance['widget']['type']]['label'] : $instance['widget']['type'],
'%widget_module' => $instance['widget']['module'],
'%field_type' => isset($field_types[$field['type']]) ? $field_types[$field['type']]['label'] : $field['type'],
'%field_type_module' => $field['module'],
drupal_set_message(t('Inactive fields are not shown unless their providing modules are enabled. The following fields are not enabled: !list', array('!list' => theme('item_list', array('items' => $list)))), 'error');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment