plugin won't install into mantis ver 2.7.0

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

Moderators: Developer, Contributor

Post Reply
mushu
Posts: 145
Joined: Jan 04, 2017 12:41 pm

plugin won't install into mantis ver 2.7.0

Post by mushu » Oct 20, 2017 6:06 pm

PHP 5.6
Mantis 2.7.0

APPLICATION ERROR #2503
Upgrading the plugin schema failed in block #1.
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.

It had installed just fine into MantisBT ver 2.6.0 however. So something in the latest Mantis has broken this plugin...?

SL-Gundam
Posts: 573
Joined: Jul 06, 2011 9:17 am

Re: plugin won't install into mantis ver 2.7.0

Post by SL-Gundam » Oct 20, 2017 9:20 pm

What EmailReporting version are you using?

Did you upgrade MantisBT or is this a clean installation (in an empty database)?

mushu
Posts: 145
Joined: Jan 04, 2017 12:41 pm

Re: plugin won't install into mantis ver 2.7.0

Post by mushu » Oct 23, 2017 11:08 am

Sorry. Windows Server 2012R2. EmailReporting plugin version is the latest available 0.10.0. This was an upgrade of Mantis from 1.3.5 to 2.7.0 in production, after I had upgraded our development server from 1.5.3 to 2.6.0 previously, and we tested it for weeks. The plugin was NOT installed in our production environment prior to this. Thus, the existing MySQLi database was updated (successfully). In hindsight I should not have jumped to 2.7.0 and should have stayed with our tested version 2.6.0 but I saw so many bug fixes that I didn't want to have to go through this painful process again so soon. My bad. The plugin worked in 2.6.0 but won't install in 2.7.0 so I assume an api changed or a regression error cropped up. How do I go about troubleshooting this please?

EDIT: I have found this forum post but I have a question about it: viewtopic.php?f=13&t=22859
When the customer did the final step of instructions, it messed up his mantis installation. Is it possible that the final step was typed incorrectly by the plugin author? To wit: the person said to do this:
3. On the MantisBT configuration page delete the configuration option: plugin_EmailReporting_schema
but I'm wondering if it was supposed to have been stated this way:
... plugin_EmailReporting_reset_schema
perhaps? (Note the "_reset_" I added.)

I only suggest this because of the GitHub bug report on that bug in the plugin which corrected it and had to do with the reset schema function. See: https://github.com/mantisbt-plugins/Ema ... ebdbd34f54

Comments?
EDIT: corrected old Mantis version to 1.3.5 from 1.5.3 per comment below.
Last edited by mushu on Oct 24, 2017 10:22 am, edited 1 time in total.

SL-Gundam
Posts: 573
Joined: Jul 06, 2011 9:17 am

Re: plugin won't install into mantis ver 2.7.0

Post by SL-Gundam » Oct 23, 2017 9:10 pm

The person in question did not perform all the steps mentioned. I suggest you try them
The steps are valid. Please don't touch plugin_EmailReporting_reset_schema

I just did a clean installation of MantisBT 2.7.0 and EmailReporting 0.10.0.
Everything went properly as it should

btw i think you mean MantisBT 1.3.5, 1.5.3 never existed

EmailReporting wants to create a table. Maybe that fails because the user MantisBT uses for the database connection does not have enough rights to create tables
I suggest adding this to your config_inc.php as it will tell you more about what goes wrong

Code: Select all

	$g_show_detailed_errors	= ON;

	$g_display_errors = array(
		E_WARNING => 'halt',
		E_NOTICE => 'halt',
		E_USER_ERROR => 'halt',
		E_USER_WARNING => 'halt',
		E_USER_NOTICE => 'halt'
	); 

mushu
Posts: 145
Joined: Jan 04, 2017 12:41 pm

Re: plugin won't install into mantis ver 2.7.0

Post by mushu » Oct 24, 2017 10:09 am

Image of error screen is below. The Mantis user for SQL access has proper permissions because when I click the [Install] button to install the plugin, and after the error I go look at the database, it has created the emailreporting plugin table. So unless there is some other permission it needs, the fact that the table gets created should mean the SQL account has proper permissions. I also went through all of those steps from the other post, and it still will not install, I get the same error message.
mbt.jpg
mbt.jpg (298.55 KiB) Viewed 3885 times

mushu
Posts: 145
Joined: Jan 04, 2017 12:41 pm

SOLVED: plugin won't install into mantis ver 2.7.0

Post by mushu » Oct 24, 2017 10:50 am

SOLVED! The issue was that the directions for installing MantisBT say to remove the api directory if you aren't using SOAP so I deleted that directory. It appears that the EmailReporting plugin needs code in that directory. I suggest that the documentation for the plugin be updated to indicate that you must have the api directory available or perhaps even do a check for it in the code during installation.

SL-Gundam
Posts: 573
Joined: Jul 06, 2011 9:17 am

Re: plugin won't install into mantis ver 2.7.0

Post by SL-Gundam » Oct 24, 2017 1:28 pm

Just tested this. It should not have hindered installation of the plugin. It should however have resulted in a blockade from then on on every page that is loaded

Added an extra check to check whether the necessary API file is available on installation
https://github.com/mantisbt-plugins/Ema ... 5ea8e5cc06

I have added the requirement to EmailReporting in the documentation
https://www.mantisbt.org/wiki/doku.php/ ... l_versions
https://github.com/mantisbt-plugins/Ema ... 5026c2188b

Where does MantisBT advise you to remove the api directory? i've been through the documentation on the MantisBT website and could not find it there
Last edited by SL-Gundam on Oct 24, 2017 2:21 pm, edited 1 time in total.

mushu
Posts: 145
Joined: Jan 04, 2017 12:41 pm

Re: plugin won't install into mantis ver 2.7.0

Post by mushu » Oct 24, 2017 1:51 pm

After installation you browse to

Code: Select all

/admin/check
to test your installation and one of those items says to get rid of directories you don't need.

Post Reply