Notice: Undefined index: target_bundles in message_entity_delete() (line 364 of message/message.module).

When I delete a content, I get the above message.

Files: 
CommentFileSizeAuthor
#7 notice_undefined-2040735-7.patch690 bytesjoelpittet
PASSED: [[SimpleTest]]: [MySQL] 69 pass(es).
[ View ]
#3 message.target_bundles.2040735-3.patch706 bytesmcrittenden
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch message.target_bundles.2040735-3.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

SocialNicheGuru’s picture

here is output from devel. Recursion is taking place:

Notice: Undefined index: target_bundles in message_entity_delete() (line 364 of message/message.module). =>
... (Array, 13 elements)
12: message_entity_delete() (Array, 2 elements)
file (String, 61 characters ) /message/mess...message/message.module:364
args (Array, 2 elements)
0 (Object) stdClass
1 (String, 4 characters ) node
11: call_user_func_array() (Array, 1 element)
args (Array, 2 elements)
0 (String, 21 characters ) message_entity_delete | (Callback) message_entity_delete();
1 (Array, 2 elements)
1 (Object) stdClass
∞ (Recursion)
2 (String, 4 characters ) node
10: module_invoke_all() (Array, 2 elements)
file (String, 23 characters ) includes/module.inc:857
args (Array, 3 elements)
0 (String, 13 characters ) entity_delete | (Callback) entity_delete();
1 (Object) stdClass
∞ (Recursion)
2 (String, 4 characters ) node

hazit’s picture

FYI - I get the same message:

Notice: Undefined index: target_bundles in message_entity_delete() (line 360 of profiles\openatrium\modules\contrib\message\message.module).

Message 7.x-1.9+0-dev
Open Atrium Messages 7.x-2.0-beta2+3-dev

Other relevant posts (all duplicates I think):
https://drupal.org/node/2050507
https://drupal.org/node/2051291
https://drupal.org/commitlog/commit/43502/58502ac35c79a2c7bb3ace158363c8...

mcrittenden’s picture

Assigned:Unassigned» mcrittenden
Status:Active» Needs review
StatusFileSize
new706 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch message.target_bundles.2040735-3.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Patch attached.

ranroz’s picture

Status:Needs review» Reviewed & tested by the community

looks ok.

Status:Reviewed & tested by the community» Needs work

The last submitted patch, 3: message.target_bundles.2040735-3.patch, failed testing.

mpotter’s picture

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

Not sure why this failed testing. We are using this in Open Atrium for many months now on the -dev of Message.

joelpittet’s picture

Assigned:mcrittenden» Unassigned
StatusFileSize
new690 bytes
PASSED: [[SimpleTest]]: [MySQL] 69 pass(es).
[ View ]

Just a re-roll, the patch applies but may not with git.

Checking patch message.module...
error: while searching for:
      }
      // Check if the field references specific bundles. If so, check if the
      // field references the deleted entity's bundle.
      if ($field['settings']['handler_settings']['target_bundles'] && !in_array($bundle, $field['settings']['handler_settings']['target_bundles'])) {
        continue;
      }
      // The reference column;

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