Last week I updated HTML Mail in its new form using Mail System and added Emogrifier. I use HTML Mail in conjunction with OG and Mailhandler to notify group members of new posts. But Emogrifier seems to break the entire system and cause Drupal core issues as well and I cannot figure out why.

The first thing I noticed was that when I retrieve messages through Mailhandler a node is created but I get a WSOD. If there are no messages to retrieve Mailhandler acts normally and reports that. If one or more messages are in the mailbox I get the WSOD. In addition, to creating a node, Rules should send a message to group moderators telling them there is a new post to publish. With Emogrifier active no message is sent by Rules.

Finally, When I run cron I get several error messages. The following appears 3 times:
strcmp() expects parameter 1 to be string, array given in /var/www/html/drupal/modules/systemsystem.module on line 1124.
Followed by this one time:
usort() [function.usort]: Array was modified by the user comparison function in /var/www/html/drupal/modules/system/system.admin.inc on line 1725.

The first message relates to creation of the system status report, which appears when the cron run completes.

I have the emogrifier class in the proper place in the libraries/emogrifier directory and all else seems to perform properly.

Comments

pillarsdotnet’s picture

Status: Active » Needs work

When I run cron I get several error messages. The following appears 3 times:
strcmp() expects parameter 1 to be string, array given in /var/www/html/drupal/modules/systemsystem.module on line 1124.

You have two modules which define exactly the same requirement. The fact that system.module doesn't handle this situation gracefully is a bug in Drupal core. Look at your status page and you'll see something that says "array" for a status. That's the culprit.

(checking...)

Hmm... Emogrifier defines a requirement called 'dom' which checks for the existence of the PHP dom extension.

Chances are, you've got another module that also defines a requirement called "dom",

I need to file a bug/patch against Drupal core to fix this. Second time I've run into this particular problem.

Meanwhile, I'm gonna rename "dom" to something less likely to conflict/overlap with other modules, and roll a new release.

pillarsdotnet’s picture

Version: 6.x-1.9 » 6.x-1.10
Status: Needs work » Fixed

Fixed in 6.x-1.10

If you still have problems, please re-open this issue.

pillarsdotnet’s picture

Title: Mailhandler, rules, htmlmail broken » Emogrifier defines the same hook_requirements() key as another module.
rsbecker’s picture

Both problems appear to be gone. Mailhandler works and I don't get the error messages when running cron.

pillarsdotnet’s picture

Status: Fixed » Closed (fixed)

Yay! One happy customer; 5,588 more to go.