Thanks for http:// www.gizra.com/content/message-notify-multilingual-email-notifications.
Today also a change received message_notify.

Now we see the following problem also in a 'fresh' Drupalinstallation without enlargements:

  • Notice: Undefined index: message_type in _field_ui_bundle_admin_path() (Zeile 320 von /var/www/xxxxx/html/xxxxx/modules/field_ui/field_ui.module).
  • Notice: Undefined index: message_type in field_ui_fields_list() (Zeile 35 von /var/www/xxxxx/html/xxxxx/modules/field_ui/field_ui.admin.inc).

The subject is often discussed. Several code changes do not seem to be able to solve the problem yet.
Maybe new solution attempts are found.
Or did we overlook a little bit?
With many greetings

Files: 
CommentFileSizeAuthor
#19 message_entity_info_hook_notice_undefined_index-1391442-19.patch792 bytesnielsonm
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch message_entity_info_hook_notice_undefined_index-1391442-19.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#7 fields report page2.png50.01 KBdrupaddict
#3 fields report page.png45.79 KBdrupaddict
#3 drush_modules_list1.png136.98 KBdrupaddict
#3 drush_modules_list2.png127.84 KBdrupaddict

Comments

Do you have latest entity API?

Yes:
7.x-1.x-dev| tar.gz (95.63 KB) | zip (122.33 KB) | 2011-Dec-28

StatusFileSize
new127.84 KB
new136.98 KB
new45.79 KB

Hello,

I am having the same issue when I go to admin/reports/fields just after enabling the module.
I have tried the stable and the dev version of message.
This is done on a clean install where I wanted to test the module messages, the website has no content yet, only a couple of modules enabled.

Any idea how to fix this?

I enclose 3 images:
the fields report page,
and 2 images of the drush output for the list of the modules in this drupal install (name, version, state)

thank you

It's probably related to Entity API, because Message doesn't do anything by itself in regards to field-UI.

thanks for your answer,
I am using the latest dev version of entity API.
I am going to try with the stable version, but I need the dev for OG 2.x.

Do you think I should transfer this issue to the entity API issue queue?

Same issue with Entity API-7.x-1.0-rc3

StatusFileSize
new50.01 KB

just in case it is useful:
when I enable OG example, the field names "message_text" and message_text_subject" are still mentioned as "locked" and it is indicated that they are used in message_type_email content type, but as you can see in the image I attach, this content type is not linked to anything, I cannot click on it to see or manage its fields.
When I go to the "structure" menu, there is a direct entry for "message types" with add and import options, and when I go to the entry content type, "message types" is not there.

I don't know if it is related or if it is a different issue.

After updating ctools, message and message_notify, I got new error messages:

Notice: Undefined index: message_type in _field_ui_bundle_admin_path() (line 325 of .../drupal/modules/field_ui/field_ui.module).
Notice: Undefined index: message_type in field_ui_fields_list() (line 35 of  .../drupal/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: comment_insert in _field_ui_bundle_admin_path() (line 325 of .../drupal/modules/field_ui/field_ui.module).
Notice: Undefined index: comment_insert in field_ui_fields_list() (line 35 of  .../drupal/modules/field_ui/field_ui.admin.inc)

It seems that with the following patch #1375452: Renaming a content type bundle causes notices on manage fields page (test improvements) , these messages would not appear anymore.
But presently the patch failed testing.

Just wanted to report that I'm also getting these messages at admin/reports/fields .

Same problem here in admin/reports/fields. With Drupal Commerce Kickstart 2 fresh install.

I'm going to try and fix this...

After a fresh install, there are no defined message types as seen on the admin/structure/messages path.

I had entity rc3, then upgraded to current dev version, no change.

UPDATE

Oh, there's a new message version 1.6. Same thing.

Too much entity foo going on for me. Someone else will have to solve this.

Part of the problem is that

<?php
field_info_bundles
('message_type');
?>

returns an empty array.

Sorry I couldn't be of more help. At least, I learned a tiny bit in the process...

Current dev message.module line 140

If you replace the line

<?php
 
'bundles' = array(),
?>

with
<?php
 
'bundles' = array(
   
'message_type' => array(
     
'label' => t('Message type'),
    ),
  ),
?>

Then the notices go away but I'm quite sure there's still a bug in there.

Any word on getting this resolved?

Receiving the same error message on an install of 7.x-1.8 - uninstalled, reinstalled - same error

Notice: Undefined index: message_type in _field_ui_bundle_admin_path() (line 325 of ///public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: message_type in field_ui_fields_list() (line 35 of ///public_html/modules/field_ui/field_ui.admin.inc).

...edit...just tried a fresh Drupal install - notice still appears

...FWIW...here are the enabled modules...

Chaos tools 7.x-1.3
Date 7.x-2.6
Date All Day 7.x-2.6
Date API 7.x-2.6
Date Popup 7.x-2.6
Date Tools 7.x-2.6
Date Views 7.x-2.6
Address Field 7.x-1.0-beta4
Entity Reference 7.x-1.0
Message 7.x-1.8
Entity API 7.x-1.1
Entity tokens 7.x-1.1
Pathauto 7.x-1.2
Token 7.x-1.5
Registration 7.x-1.1
Registration Entity Access 7.x-1.1
Registration Views 7.x-1.1
Rules 7.x-2.3
Rules Scheduler 7.x-2.3
Rules UI 7.x-2.3
CKEditor 7.x-1.13
Views 7.x-3.7
Views UI 7.x-3.7

#13 This gets rid of the error and creates an entry Message type for this which is not clickable.

Is that the correct behavior?

slight modification

<?php
 
'bundles' => array(
   
'message_type' => array(
     
'label' => t('Message type'),
    ),
  ),
?>

I updated the code from #16 and still have the Undefined index notices

edit - The Undefined index notices have now disappeared. ...a couple of cache flushes were required

Had exactly the same notices as #15 when calling on Administration › Reports › Field List:

Notice: Undefined index: message_type in _field_ui_bundle_admin_path() (line 325 of ///public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: message_type in field_ui_fields_list() (line 35 of ///public_html/modules/field_ui/field_ui.admin.inc).

Replacing line 142 in ../sites/all/modules/message/message.module with the five lines from #16 fixed it, but only after clearing the cache and arguably not at its root.

StatusFileSize
new792 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch message_entity_info_hook_notice_undefined_index-1391442-19.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

I created a patch to add message_type to the bundles sub-array of the entity info hook. This appears to fix it for me as well.

Status:Active» Needs review

Changing to "needs review" so the testbot tests the patch

patch in comment #19 doesn't work for me!!

#19 worked for me. Thank you for posting.

Applied the patch in #19. On clearing the sites cache I get this error message:

EntityMetadataWrapperException: Unknown data property message_text. in EntityStructureWrapper->getPropertyInfo() (line 339 of /sites/all/modules/entity/includes/entity.wrapper.inc).

Issue summary:View changes
Status:Needs review» Reviewed & tested by the community

Applied patch, cleared cache and message gone

Tested #19 in Open Atrium 2 and it works here also. Should get this committed?

Can you re-roll this please

curl https://drupal.org/files/message_entity_info_hook_notice_undefined_index-1391442-19.patch | git apply

I get:

error: patch failed: message.module:139
error: message.module: patch does not apply

Status:Reviewed & tested by the community» Needs work