Hi, Thanks a lot for a great module!
I have been using a Privat Message and it not a best choice.
I installed PM_lite on D6.2 and got this message at the top of page (node/add/pm)

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/drupalcook/domains/drupalcookbook.ru/public_html/sites/all/modules/default_filter-5.x-2.0-patched/default_filter.module on line 201.

This is a patched version of default_filter-5.x-2.0 to work with a Drupal 6.2.
But this module works fine in all other cases. So PM_lite probably do somthing wrong. I'm attaching a patched version of Default_Filter.module

I'll try to help. I like this module.

Comments

vladsavitsky’s picture

Forgot to write:

Module default filter wasn't set to serve the "privat message" node type.
When I setup a rule for "pm" type nothing was changed - message still appears at the top of page.

rszrama’s picture

Assigned: Unassigned » rszrama
Status: Active » Fixed

Sorry, I don't believe this is an issue w/ PM Lite. That module is hardcoded to look for an array in the node form array with the key 'body_field', and because that doesn't exist the module is throwing up errors. You should modify the code to make sure the second argument of the array_key_exists() calls is even an array before looking for a key in it.

Honestly, the module shouldn't just assume everyone will name their body fields the same thing... unless there's some standard I missed when writing my implementation of hook_form(). For example, that default filter module will break w/ the same error message on a node type that doesn't have a body field (which anyone can turn off on a content type's edit form).

Marking this issue fixed.

vladsavitsky’s picture

Ok. Thanks for your replay.
I post this issue here because default filter works fine with other content types so I decided that problem could be with this module.
I'll hack a default filter module to use the PM_lite. I like this module.
Thanks a lot.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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