Running bug_report_mail.php yields error

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
daisukepr
Posts: 12
Joined: 14 Jan 2015, 20:45

Running bug_report_mail.php yields error

Post by daisukepr »

I've gotten enough configuration set to test receiving emails, but when I enable running the script on a webserver and run "/mantisbt/plugins/EmailReporting/scripts/bug_report_mail.php" I get the following error:

Code: Select all

APPLICATION ERROR #401
Database query failed. Error received from database was #1048: Column 'msg_id' cannot be null for the query: INSERT
INTO mantis_plugin_EmailReporting_msgids_table
( issue_id, msg_id )
VALUES
( ?, ?).

When I do a regular test of my email configuration, the page just clears itself (so I'm assuming it ran okay), but when I do a complete test, I get a similar message to the above (note: I replaced the domain and configured email address with XXX):

Code: Select all

APPLICATION ERROR #401
Database query failed. Error received from database was #1048: Column 'msg_id' cannot be null for the query: INSERT
INTO mantis_plugin_EmailReporting_msgids_table
( issue_id, msg_id )
VALUES
( ?, ?).

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Previous non-fatal errors occurred. Page contents follow.

SYSTEM WARNING: 'Invalid argument supplied for foreach()' in '/home/xxx/public_html/mantisbt/core/gpc_api.php' line 259


Mailbox: autofeedback
Message: Reporter: 5 - xxx@xxx.xxx --> Issue ID: #11


Would anyone be able to offer assistance?

Thank you!
daisukepr
Posts: 12
Joined: 14 Jan 2015, 20:45

Re: Running bug_report_mail.php yields error

Post by daisukepr »

And it looks like I was able to fix/workaround this by setting "Use Message-ID in Mail header to identify notes" to "No" from the default "Yes"

Phew! :-)
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Running bug_report_mail.php yields error

Post by SL-Gundam »

I suspect this has todo with this bug: https://www.mantisbt.org/bugs/view.php?id=17640
It says fixed in 1.2.18 but the last commit is in 1.2.x and so after release of 1.2.18

But i will add some extra safety checks so that this hopefully will be fixed
Last edited by SL-Gundam on 16 Jan 2015, 16:46, edited 1 time in total.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Running bug_report_mail.php yields error

Post by SL-Gundam »

Safety checks added: https://github.com/mantisbt-plugins/Ema ... a66515d146

I would appreciate it if you downloaded the latest version and enable the functionality you disabled
daisukepr
Posts: 12
Joined: 14 Jan 2015, 20:45

Re: Running bug_report_mail.php yields error

Post by daisukepr »

I installed the updated version, then ran a new Complete Test on the mail settings. This time it says Operation successful along with the details; however, there is a warning in red at the top of the page (I've removed some of the url path for privacy reasons)

SYSTEM WARNING: 'Invalid argument supplied for foreach()' in '/xxx/xxx/xxx/mantisbt/core/gpc_api.php' line 259
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Running bug_report_mail.php yields error

Post by SL-Gundam »

See earlier quote about this bug: https://www.mantisbt.org/bugs/view.php?id=17640 here: viewtopic.php?p=56500#p56500

That is a MantisBT bug
Collin
Posts: 1
Joined: 04 Apr 2015, 11:40

Re: Running bug_report_mail.php yields error

Post by Collin »

When I do a regular test of my email configuration, the page just clears itself (so I'm assuming it ran okay), but when I do a complete test, I get a similar message to the above (note: I replaced the domain and configured email address with XXX):
NAT
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Running bug_report_mail.php yields error

Post by SL-Gundam »

So the same answer should suffice: viewtopic.php?p=56500#p56500
Post Reply