When using debug mode (in SMTP settings), and a batch operation is performed which sends emails, this causes the debugging information to be interpreted as an AJAX error, rather than printed to the screen.

Might it be preferable to use drupal_set_message() instead, that way the information would not be output during an ajax call?

see also #321219: smtp output when smtp module used

Comments

jrreid’s picture

Status: Active » Needs review
StatusFileSize
new9.87 KB

Here's a quick patch to fix this for 7.x-1.x

damienmckenna’s picture

StatusFileSize
new9.87 KB

Reuploading the patch file to trigger the testbot.

damienmckenna’s picture

This should be safe to include in the next release.

damienmckenna’s picture

Alternatively, should it use watchdog to log the messages?

Anonymous’s picture

StatusFileSize
new29.16 KB

Worked great for me in a clean install. Let me know if you want this tested with other patches as well.

gadaniels72’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new132.02 KB

Worked for me as well. To test I:

  • Verified in the code that there are no remaining direct print/echo messages
  • Installed on a clean install
  • Set up configuration to use my mail server
  • Entered a test email address
  • Set debugging to log everything
  • Saved
  • Verified that messages appeared and that no AJAX error occurred
wundo’s picture

wundo’s picture

  • wundo committed b524646 on 7.x-1.x authored by DamienMcKenna
    Issue #2497359 by DamienMcKenna, jrreid, alex_drupal_dev, gadaniels72,...
wundo’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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