I get the following error whenever I visit the mail page:

Location /node/add/mail
Message in_array(): Wrong datatype for second argument in /home/live_drupal-4.6_sites/modules/node.module on line 1324.

Comments

Steve Dondley’s picture

More details:

I deleted the node_options_mail entry in the variables table and errors went away. But when I customized the default options in admin/node/configure, the problem appears. Obviously, the mail.module is not storing the data in the database in a format that 4.6 expects.

nedjo’s picture

Okay, thanks for the details, I'll look into it when I get a chance. Meantime, a patch would be welcome!

allie micka’s picture

This appears to be an issue with drupal itself ( possibly http://drupal.org/node/19041 )

I got this behavior when I deslected all node options on the node config page (published, in moderation queue, etc) because I wanted to send emails to users but not publish them anywhere.

A workaround is to select one of the options on the node config page (e.g. anything but "published")

Steve Dondley’s picture

nedjo,

Yes, a patch is welcome but there are only so many hours. I figure it's better to report now rather than wait until I can find the time to track down the bug.

Steve Dondley’s picture

Allie,

Yes I think this is likely a Drupal problem myself. But that bug you linked to doesn't seem to be related. When I look in the database under the value node_mail_options, I see that the serialized data is getting save as a scalar. It should be getting save as an array. The mail.module doesn't even handle these options.

The only thing that is holding me back from saying that it is a Drupal problem is that I haven't see errors with other modules which should also be affected.

I'm still confused by what's going on.

Steve Dondley’s picture

Allie,

OK, I took a closer look at the post and discovered its only when they are all desected. I was able to duplicate this. with other content type This is not just a mail content type problem.

Thanks for the tip.

Steve Dondley’s picture

Allie,

OK, that patch on the link you provided seems to have worked.