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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

Do you have latest entity API?

efarg’s picture

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

drupalycious’s picture

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

amitaibu’s picture

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

drupalycious’s picture

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?

drupalycious’s picture

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

drupalycious’s picture

FileSize
50.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.

drupalycious’s picture

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.

JordanMagnuson’s picture

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

amorales@drupal.org.es’s picture

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

Robin Millette’s picture

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.

Robin Millette’s picture

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

Part of the problem is that
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...

Robin Millette’s picture

Current dev message.module line 140

If you replace the line

  'bundles' = array(),

with

  '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.

Christopher Riley’s picture

Any word on getting this resolved?

joemaine’s picture

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
SocialNicheGuru’s picture

#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

  'bundles' => array(
    'message_type' => array(
      'label' => t('Message type'),
    ),
  ),
joemaine’s picture

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

vantastic’s picture

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.

nielsonm’s picture

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.

bjlewis2’s picture

Status: Active » Needs review

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

saurabh tiwari’s picture

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

fossle’s picture

#19 worked for me. Thank you for posting.

T.Mardi’s picture

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).

kjProtocol’s picture

robcarr’s picture

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

Applied patch, cleared cache and message gone

mpotter’s picture

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

amitaibu’s picture

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
rjacobs’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
rjacobs’s picture

Status: Needs work » Needs review
FileSize
870 bytes

Interesting, patch applies fine via normal "patch" command (some fuzz):

$ git clone --branch 7.x-1.x http://git.drupal.org/project/message.git
$ cd message
$ curl https://drupal.org/files/message_entity_info_hook_notice_undefined_index-1391442-19.patch > 1391442-19.patch
$ patch -p1 < 1391442-19.patch 
patching file message.module
Hunk #1 succeeded at 141 with fuzz 2 (offset 2 lines).

I wonder why the testbots choke on it.

Anyway, here's a re-roll.

rjacobs’s picture

Status: Needs review » Reviewed & tested by the community

From the history it seems the only thing that knocked this out of RTBC status was something corrupt about the patch. So after this re-roll, and passing tests, (with no other changes) I'm going to go ahead and restore that status.

cjoy’s picture

#31 works for me

japerry’s picture

The #31 patch fails in the most recent version of message. Here is a re-patch to this issue, and it resolves the error.

millionleaves’s picture

The patch in #34 worked for me (after clearing cache) - thanks.

Arrow’s picture

#34 worked for me as well.

szczesuil’s picture

#34 works for me on 7.28. Thank you!

chickenforce’s picture

#34 was helpful for me as well with Commerce Kickstart 2.19. Thank you so much :)

jelo’s picture

#34 worked for me too. Core 7.33, message 7.x-1.9.

aramboyajyan’s picture

#34 worked for me too. Core 7.34, message 7.x-1.9.

r2coder’s picture

#34 worked for me too. Core 7.34, message 7.x-1.9.

wundo’s picture

Status: Reviewed & tested by the community » Fixed

This was pushed on github: https://github.com/Gizra/message/pull/12#event-238625366

Marking as fixed

  • amitaibu committed 6c2c09c on 7.x-1.x
    Merge pull request #12 from chuva-inc/...
  • wundo committed d7ba15a on 7.x-1.x authored by japerry
    Issue #1391442 by drupalycious, rjacobs, nielsonm, japerry: Undefined...

Status: Fixed » Closed (fixed)

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