Page 1 of 1

Running bug_report_mail.php yields error

Posted: 16 Jan 2015, 01:36
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!

Re: Running bug_report_mail.php yields error

Posted: 16 Jan 2015, 01:43
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! :-)

Re: Running bug_report_mail.php yields error

Posted: 16 Jan 2015, 16:38
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

Re: Running bug_report_mail.php yields error

Posted: 16 Jan 2015, 16:45
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

Re: Running bug_report_mail.php yields error

Posted: 16 Jan 2015, 17:11
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

Re: Running bug_report_mail.php yields error

Posted: 16 Jan 2015, 18:48
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

Re: Running bug_report_mail.php yields error

Posted: 04 Apr 2015, 11:41
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):

Re: Running bug_report_mail.php yields error

Posted: 04 Apr 2015, 19:59
by SL-Gundam
So the same answer should suffice: viewtopic.php?p=56500#p56500