Error #26 in Mantis 2.15.0

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Error #26 in Mantis 2.15.0

Post by mushu »

Site Information
MantisBT Version 2.15.0
Schema Version 209
PHP Version 5.6.31
Database Driver mysqli
Database Version, Description 5.7.13, 5.7.13-log
Site Path C:\MantisBT2150\
Core Path C:\MantisBT2150\core\
Plugin Path C:\MantisBT2150\plugins\
.
mantis-bug1 (Medium).jpg
mantis-bug1 (Medium).jpg (113.93 KiB) Viewed 4735 times
.
User is "Developer" using Chrome was in "View issues" and tried to click on issue created by different person "Reporter" who had used IE 11 to create new tickets manually (not via email.) Every ticket created by IE 11 user causes crash by this Developer when he tries to access it, but myself as "Administrator" can open those tickets without errors. Problem still exists when developer refreshes browser window via [ctrl-F5] to force server reload.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error #26 in Mantis 2.15.0

Post by atrol »

I am not able to reproduce.

Are you able to provide step by step instructions to reproduce the issue on a fresh Mantis install without any 3rd party plugins?

I have a certain feeling that there could be a bug in a 3rd party plugin you use.
On a screen shot of another post from you, I see that you are using a plugin adLogin.
Do you get the same issue when disabling the plugin?

I am pretty sure your issue is fixed by changing line 1060 in core/html_api.php
from

Code: Select all

	$t_current_user_id = auth_get_current_user_id();
to

Code: Select all

	$t_current_user_id = (int)auth_get_current_user_id();
But this would just be a workaround, hiding another bug and not a solution,
Please use Search before posting and read the Manual
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Error #26 in Mantis 2.15.0

Post by mushu »

Ahhhh yes. I remember now. I made that patch and missed the file being edited when I upgraded our DEV instance. Thanks for the reminder, yes that fixes the error, but I agree that the ADlogin module might be the issue. Thanks!
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error #26 in Mantis 2.15.0

Post by atrol »

mushu wrote: 12 Jun 2018, 15:27but I agree that the ADlogin module might be the issue. Thanks!
Maybe this explains also the root cause of Error #26 from https://mantisbt.org/forums/viewtopic.php?f=3&t=25627
Please use Search before posting and read the Manual
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Error #26 in Mantis 2.15.0

Post by mushu »

I doubt it because that was in our Production environment and the html_api.php patch has been done to that already.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error #26 in Mantis 2.15.0

Post by atrol »

There is more than one place where a bug in a plugin can cause error #26.
Please use Search before posting and read the Manual
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Error #26 in Mantis 2.15.0

Post by mushu »

@atrol I'm just wondering what part of my original screenshot "stack trace" told you which file and line needed to be patched? I don't have much PHP coding knowledge, so I'm hoping you can share some wisdom with me so i can be more self-sufficient for future crashes.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error #26 in Mantis 2.15.0

Post by atrol »

No wisdom, quite simple.

Line #1 tells what's going wrong: Comparison of integer with string (string does not make sense for the user id)
Line #2 tells where it's called: Just look where the 2nd parameter has been set before
Please use Search before posting and read the Manual
Post Reply