Admin config screen blank when login

Get help from other users here.

Moderators: Developer, Contributor

mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Admin config screen blank when login

Post by mushu »

Windows Server 2012R2
MantisBT 2.25.2

Not sure where to start troubleshooting this. Updated to v2.25.2 and copied over all of the plugins we installed and made appropriate config file changes. Everything seems to work except when I go into the Management screen and it asks me to verify my password. I enter that and it seems to accept it, but then goes to a blank gray screen. The layout doesn't match the original color scheme either. Where should I start to look? Perhaps I missed some file copy or forgot to edit something in the config.

Note: I copied over the previous version user config files, I did not use the new version. So if there are extra settings in the user config file then i will need to know what those are.

Also, what is the difference between a $t_ and $p_ variables please?
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

Guess there's light forum traffic during the holidays. :-(

I'm thinking it has something to do with the ADlogin plugin not authenticating properly but that's just a guess. It seems like it is not reading the css or something but I just don't know where to start looking.
cas
Posts: 1121
Joined: 11 Mar 2006, 16:08
Contact:

Re: Admin config screen blank when login

Post by cas »

so if you deactivate that plugin all works as expected?
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

I can't get in to do anything admin related. If I remove the adLogin plugin directory the entire site fails with this error:
APPLICATION ERROR #1406

Cannot initiate StartTLS on LDAP server.

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.
Detailed error information
Full path: C:\MantisBT2252\core\ldap_api.php
Line number: 127
The plugin itself is literally just this code:

Code: Select all

<?php
class adLoginPlugin extends MantisPlugin {
 	function register() {
		$this->name        = 'adLogin';
		$this->description = 'Automated login within AD';
		$this->version     = '1.01';
		$this->requires    = array('MantisCore'       => '2.0.0',); # 1.2.0
		$this->author      = 'Cas Nuy';
		$this->contact     = 'Cas-at-nuy.info';
		$this->url         = 'http://www.nuy.info';
	}
 	function init() { 
		plugin_event_hook( 'EVENT_CORE_READY', 'login_ad' );
	}
 	function login_ad() {
		if ( isset($_SERVER['AUTH_USER'])) {
			$temp = explode('\\', $_SERVER['AUTH_USER']); 
			if ($temp[1] == "") {
				$name = $temp[0];
			} else {
				$name = $temp[1];
			}
			$ok=auth_attempt_script_login( $name );
		}
	}
}
I just saw that the referenced file (ldap_api.php) is about 2k bigger in the new version of Mantis than the old one, so obviously a fair amount of changes have been done there. Wonder if there is anything I can tweak in the adLogin plugin to get it to work again?
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

Also, it should be noted that with the plugin directory there the main screen of Mantis works properly and I can do everything normally like I used to. It only fails when I click the Maintenance button and enter my password.
cas
Posts: 1121
Joined: 11 Mar 2006, 16:08
Contact:

Re: Admin config screen blank when login

Post by cas »

hangon, this plugin does not touch the LDAP server at all. This only works on Windows, check the readme with that plugin. But do not use login method LDAP. What other plugins have you enabled now?
cas
Posts: 1121
Joined: 11 Mar 2006, 16:08
Contact:

Re: Admin config screen blank when login

Post by cas »

using phpmyadmin, you can simply disable plugins.
Open up table mantis_plugin_table and change value of field "enabled" to 0.
Do not change plugin "MantisCoreFormatting"
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

cas wrote: 24 Nov 2021, 15:47 hangon, this plugin does not touch the LDAP server at all. This only works on Windows, check the readme with that plugin. But do not use login method LDAP. What other plugins have you enabled now?
Note that these all worked just fine in Mantis v2.24.3 since I simply copied them into the new version plugins folder:

Code: Select all

C:\MantisBT2252\plugins>dir
 Volume in drive C has no label.
 Volume Serial Number is C01F-927F

 Directory of C:\MantisBT2252\plugins

11/24/2021  08:12 AM    <DIR>          .
11/24/2021  08:12 AM    <DIR>          ..
11/23/2021  09:29 AM    <DIR>          adLogin
11/23/2021  09:29 AM    <DIR>          EmailReporting
11/12/2021  10:07 AM    <DIR>          Gravatar
11/23/2021  09:29 AM    <DIR>          import_user
11/23/2021  09:29 AM    <DIR>          JqueryExample
11/12/2021  10:07 AM    <DIR>          MantisCoreFormatting
11/12/2021  10:08 AM    <DIR>          MantisGraph
11/23/2021  09:29 AM    <DIR>          MicrosoftTeams
11/23/2021  09:29 AM    <DIR>          TimeTracking
06/17/2021  08:03 AM               309 Web.config
11/12/2021  10:08 AM    <DIR>          XmlImportExport
               1 File(s)            309 bytes
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

cas wrote: 24 Nov 2021, 15:52 using phpmyadmin, you can simply disable plugins.
Open up table mantis_plugin_table and change value of field "enabled" to 0.
Do not change plugin "MantisCoreFormatting"
When I disable that plugin by editing the table and go to the homepage of the Mantis install I still get the same error as before (but if I put it back in it works fine until I click the Manage button):

Code: Select all

APPLICATION ERROR #1406

Cannot initiate StartTLS on LDAP server.

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.
Detailed error information
Full path: C:\MantisBT2252\core\ldap_api.php
Line number: 127
Stack trace
#	Filename	Line	Class	Type	Function	Args
0	C:\MantisBT2252\core\ldap_api.php	127	-	-	trigger_error	<string>'1406', <integer>256
1	C:\MantisBT2252\core\ldap_api.php	374	-	-	ldap_connect_bind	-
2	C:\MantisBT2252\core\ldap_api.php	344	-	-	ldap_authenticate_by_username	<string>'administrator', <string>'root'
3	C:\MantisBT2252\core\authentication_api.php	762	-	-	ldap_authenticate	<integer>1, <string>'root'
4	C:\MantisBT2252\login_page.php	150	-	-	auth_does_password_match	<integer>1, <string>'root'
cas
Posts: 1121
Joined: 11 Mar 2006, 16:08
Contact:

Re: Admin config screen blank when login

Post by cas »

What is your login method?
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

Active Directory since it is installed on a local server in the network.

EDIT: Windows Authentication in IIS with all other methods disabled on the site.
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

Forgot to say that I also updated PHP from 5.6 to 7.4 and copied over the php.ini file from the old version, then verified that there were no version-specific or directory-specific issues in it. I remember reading that PHP 7 had some kind of breaking issue a while back, but assume that has all been fixed in Mantis by now.
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

GOT IT FIGURED OUT!

It was using STARTTLS for the LDAP server (carried in from the default config settings, thus I missed it) which is not configured for that. I turned that option off in the config file and then it logged me in and went to the "checking installation" screen and everything was good *except* for this:

Code: Select all

Plugins
'HTMLMail': Missing Plugin
The plugin is installed in the Mantis database, but could not be loaded.
Remove the Plugin or reinstall its source code.
So would I disable that plugin and then try to reinstall it from the Manage screen?

EDIT: not sure where I got that plugin but I deleted it and everything seems to be working fine now. Thanks for your help cas!
Last edited by mushu on 24 Nov 2021, 18:25, edited 1 time in total.
mushu
Posts: 227
Joined: 04 Jan 2017, 17:41

Re: Admin config screen blank when login

Post by mushu »

I've been comparing the code changes in the ldap_api.php file and starting around line 100 there is a bunch of new code that starts checking TLS protocol stuff that it didn't do before. That is what killed me since the defaults in the default_config.php file had those options enabled but our setup wasn't using that.

Would have been nice to have mentioned the TLS protocol code changes for LDAP in the release notes.
cas
Posts: 1121
Joined: 11 Mar 2006, 16:08
Contact:

Re: Admin config screen blank when login

Post by cas »

It looks like your mantis Login Method was set to LDAP which should not be the case when using the adLogin plugin.......
Good to hear all is sorted now.
Post Reply