Page 1 of 1

Admin maintenance goes to wrong start page

Posted: 30 Nov 2021, 23:40
by mushu
Windows Server 2012R2
MantisBT 2.25.2

Every time I click the [Manage] button and enter the admin password to go into the settings, this version of Mantis goes to the /admin/install.php screen every freaking time! The previous version didn't do that. I have to go back to the main tickets screen and then click the [Manage] button again to get to the settings tabs.

Is there a new config file option in this version that specifies the first webpage to display when you go into the admin screen?

Re: Admin maintenance goes to wrong start page

Posted: 01 Dec 2021, 12:37
by rfeldbauer
It seems the code that determines what you see when you click the Manage button is in the mantisFolder\core\layout_api.php file. The function is called 'layout_manage_menu_link'.
It determines the page based on your permissions - mine is set to go the 'manage_user_page.php' page.
I don't believe there is a config option for this.
I'm not sure if you should mess with this core file tho ...
It somewhat sounds like your installation didn't complete successfully.
2021-12-01_07h28_19.png
2021-12-01_07h28_19.png (42.01 KiB) Viewed 5016 times

Re: Admin maintenance goes to wrong start page

Posted: 01 Dec 2021, 17:02
by mushu
Thanks for replying. My file is the same as yours. I compared it to the previous version and only minor changes were made. Wondering if something else, perhaps a custom variable was added somewhere?

Re: Admin maintenance goes to wrong start page

Posted: 01 Dec 2021, 17:28
by mushu
Also, in Chrome browser console window, the following Javascript error is showing which may be part of this. When I click the [Manage] button and then enter my password, it goes to the install.php page and the following error shows up in the browser console:

install.js:146 Uncaught TypeError: Cannot read properties of undefined (reading 'trim')
at update_sample_table_names (install.js:146)
at HTMLDocument.<anonymous> (install.js:140)
at i (jquery-2.2.4.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.2.4.min.js:2)
at Function.ready (jquery-2.2.4.min.js:2)
at HTMLDocument.J (jquery-2.2.4.min.js:2)

Re: Admin maintenance goes to wrong start page

Posted: 02 Dec 2021, 11:45
by cas
Did you try another browser?

Re: Admin maintenance goes to wrong start page

Posted: 02 Dec 2021, 21:10
by atrol
I guess you did not run a needed database upgrade.
This is checked when logging in / reauthenticating.

So the clean solution is to run the upgrade.
The quick and dirty workaround is to suppress the check by settting

Code: Select all

$g_admin_checks = OFF; 
in config_inc,php

Re: Admin maintenance goes to wrong start page

Posted: 06 Dec 2021, 15:12
by mushu
THANK YOU @atrol I think this was the missing item. It appears that the only thing I was missing was an email table change. I don't normally do a database update unless it is listed in the Change Log for the new Mantis version. I ran the database update and now I will see if it works properly. Unfortunately I have to wait until the admin login authentication times out to see if it is working, but will edit this note and record if it solved the problem or not.