Error #26 in Mantis 2.15.0

Get help from other users here.

Moderators: Contributor, Developer

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

Error #26 in Mantis 2.15.0

Post by mushu » Jun 11, 2018 5:11 pm

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 164 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: 7123
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Error #26 in Mantis 2.15.0

Post by atrol » Jun 12, 2018 1:23 am

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: 98
Joined: Jan 04, 2017 12:41 pm

Re: Error #26 in Mantis 2.15.0

Post by mushu » Jun 12, 2018 10:27 am

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: 7123
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Error #26 in Mantis 2.15.0

Post by atrol » Jun 12, 2018 11:46 am

mushu wrote:
Jun 12, 2018 10:27 am
but 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: 98
Joined: Jan 04, 2017 12:41 pm

Re: Error #26 in Mantis 2.15.0

Post by mushu » Jun 12, 2018 11:56 am

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: 7123
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Error #26 in Mantis 2.15.0

Post by atrol » Jun 12, 2018 12:31 pm

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: 98
Joined: Jan 04, 2017 12:41 pm

Re: Error #26 in Mantis 2.15.0

Post by mushu » Jun 14, 2018 4:09 pm

@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: 7123
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Error #26 in Mantis 2.15.0

Post by atrol » Jun 15, 2018 4:14 pm

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