Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I tried to manage the display of my message using display suite. I have simple message to display and only want to keep the Default display, but when I delete all the others display, I get an error message on the message edit page :
Notice: Undefined index: default in message_field_attach_form() (line 505 of D:\***\Drupal\sites\all\modules\message\message.module). Backtrace:
message_field_attach_form('message_type', Object, Array, Array, 'en') field.attach.inc:580
field_attach_form('message_type', Object, Array, Array, 'en') message.admin.inc:297
message_type_form(Array, Array, Object, 'edit', 'message_type')
call_user_func_array('message_type_form', Array) form.inc:798
drupal_retrieve_form('message_type_edit_commerce_order_message_form', Array) form.inc:339
drupal_build_form('message_type_edit_commerce_order_message_form', Array) entity.module:1095
entity_ui_get_form('message_type', Object)
call_user_func_array('entity_ui_get_form', Array) menu.inc:517
menu_execute_active_handler() index.php:21
Notice: Undefined index: default in message_field_attach_form() (line 505 of D:\***\Drupal\sites\all\modules\message\message.module). Backtrace:
message_field_attach_form('message_type', Object, Array, Array, 'en') field.attach.inc:580
field_attach_form('message_type', Object, Array, Array, 'en') message.admin.inc:297
message_type_form(Array, Array, Object, 'edit', 'message_type')
call_user_func_array('message_type_form', Array) form.inc:798
drupal_retrieve_form('message_type_edit_commerce_order_message_form', Array) form.inc:339
drupal_build_form('message_type_edit_commerce_order_message_form', Array) entity.module:1095
entity_ui_get_form('message_type', Object)
call_user_func_array('entity_ui_get_form', Array) menu.inc:517
menu_execute_active_handler() index.php:21
Any idead how to fix it ? Is message not compatible with display suite ? I thought it was as it integrate entity API and should not be different than all others entities that perfectly works with DS
Regards,
Alex
Comments
Comment #1
arosboro CreditAttribution: arosboro commentedThis error also occurs in 1.7 stable release if there are visible fields in the default display mode.
Comment #2
arosboro CreditAttribution: arosboro commentedThis bug appears to be from an upgrade of a previous version of message involving message types defined in that older module.
From the api documentation:
It appears at some point default was defined, but no longer. Uninstalling message/message notify and re-enabling the modules resolved this issue.
Perhaps an update should be made that sets the bundle settings to remove the default, or it should be ignored in message_field_attach_form() of the module.
Comment #3
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commented