View Issue Details

IDProjectCategoryView StatusLast Update
0024572mantisbtdb mssqlpublic2019-01-07 14:16
Reporterghirschy Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version2.14.0 
Summary0024572: When opening the summary tab APPLICATION ERROR #401 is displayed
Description

We use MSSQL and the summary page could not be displayed.
We have used Mantis for 2 months now. In the past the summary was correctly displayed.

Steps To Reproduce

Open Summary tab

TagsNo tags attached.

Relationships

related to 0019952 new error when click on Summary Link - APPLICATION ERROR 0000401 

Activities

dregad

dregad

2018-06-28 18:52

developer   ~0060191

In the past the summary was correctly displayed.

So the question is, what has changed between "the past" and now (upgrades, etc) ?

Please provide further details, including the offending SQL query.

ghirschy

ghirschy

2018-06-29 08:20

reporter   ~0060195

This is a new installation of Mantis, we didn't upgrade.
After the installation and for some time the Summary page was displayed correctly.

Where should I found de offending SQL query.
I'm attaching an image of what I see.

Thanks

Mantis.PNG (16,171 bytes)   
Mantis.PNG (16,171 bytes)   
dregad

dregad

2018-06-29 08:46

developer   ~0060196

Please follow these steps:

  1. temporarily configure your system as follows:
    $g_display_errors = array(
    E_WARNING => 'halt',
    E_NOTICE => 'halt',
    E_USER_ERROR => 'halt',
    E_USER_WARNING => 'halt',
    E_USER_NOTICE => 'halt'
    );
    $g_show_detailed_errors = ON;

WARNING - SECURITY RISK: the 'show_detailed_errors' config can cause MantisBT to display sensitive information about your system. We recommend to restrict its activation to a Test environment, only for as long as necessary. If possible, do not turn it ON globally, instead limit it for specific user(s) using the Manage Configuration page.

  1. Reproduce the error

If the output does not help you resolving the issue and you need further assistance,

  1. save the output of the error screen, preferably as an HTML page (not a screenshot !)
  2. be careful to remove/mask any confidential information if needed
  3. upload the results here
ghirschy

ghirschy

2018-06-29 09:03

reporter   ~0060197

Thanks

Here is the page

Resumen - MantisBT.htm (12,728 bytes)   
<!DOCTYPE html>
<html><head>
	<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
	<title>Resumen - MantisBT</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/default.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/status_config.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/dropzone-4.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/bootstrap-3.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/font-awesome-4.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/fonts.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/bootstrap-datetimepicker-4.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/ace.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/ace-mantis.css">
	<link rel="stylesheet" type="text/css" href="Resumen%20-%20MantisBT_files/ace-skins.css">

	<link rel="shortcut icon" href="http://192.168.1.202:88/images/favicon.ico" type="image/x-icon">
	<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Búsqueda de texto completo" href="http://192.168.1.202:88/browser_search_plugin.php?type=text">
	<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: buscar por ID de incidencia" href="http://192.168.1.202:88/browser_search_plugin.php?type=id">
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/javascript_config.php"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/javascript_translations.php"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/jquery-2.js"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/dropzone-4.js"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/common.js"></script>

</head>
<body class="skin-3">
<style>
* { font-family: "Open Sans"; } 
h1, h2, h3, h4, h5 { font-family: "Open Sans"; } 
</style>
<div id="navbar" class="navbar navbar-default navbar-collapse navbar-fixed-top noprint"><div id="navbar-container" class="navbar-container"><button id="menu-toggler" type="button" class="navbar-toggle menu-toggler pull-left hidden-lg hidden-md" data-target="#sidebar"><span class="sr-only">Toggle sidebar</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><div class="navbar-header"><a href="http://192.168.1.202:88/my_view_page.php" class="navbar-brand"><span class="smaller-75"> MantisBT </span></a><button type="button" class="navbar-toggle navbar-toggle collapsed pull-right hidden-sm hidden-md hidden-lg" data-toggle="collapse" data-target=".navbar-buttons,.navbar-menu"><span class="sr-only">Toggle user menu</span><i class="ace-icon fa fa-user fa-2x white"></i> </button></div><div class="navbar-buttons navbar-header navbar-collapse collapse"><ul class="nav ace-nav"><li class="hidden-sm hidden-xs"><div class="btn-group btn-corner padding-right-8 padding-left-8"><a class="btn btn-primary btn-sm" href="http://192.168.1.202:88/bug_report_page.php"><i class="fa fa-edit"></i> Reportar incidencia</a><a class="btn btn-primary btn-sm" href="http://192.168.1.202:88/manage_user_create_page.php"><i class="fa fa-user-plus"></i> Invitar usuarios</a></div></li><li class="grey" id="dropdown_projects_menu">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
&nbsp;Todos los proyectos&nbsp;
 <i class="ace-icon fa fa-angle-down bigger-110"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right dropdown-yellow dropdown-caret dropdown-close scrollable-menu">
<li class="active"><a href="http://192.168.1.202:88/set_project.php?project_id=0">Todos los proyectos </a></li>
<li class="divider"></li>
<li><div id="projects-list"><div class="projects-searchbox"><input class="search form-control input-md" placeholder="Buscar"></div><ul class="list dropdown-yellow no-margin"><li><a href="http://192.168.1.202:88/set_project.php?project_id=1" class="project-link"> CAMS </a></li><li><a href="http://192.168.1.202:88/set_project.php?project_id=8" class="project-link"> Guardia </a></li><li><a href="http://192.168.1.202:88/set_project.php?project_id=5" class="project-link"> HCE </a></li><li><a href="http://192.168.1.202:88/set_project.php?project_id=4" class="project-link"> Modulos </a></li></ul></div></li></ul>
</li>
<li class="grey"><a data-toggle="dropdown" href="#" class="dropdown-toggle"><i class="ace-icon fa fa-user fa-2x white"></i> <span class="user-info">Guillermo</span><i class="ace-icon fa fa-angle-down"></i></a><ul class="user-menu dropdown-menu dropdown-menu-right dropdown-yellow dropdown-caret dropdown-close"><li><a href="http://192.168.1.202:88/account_page.php"><i class="ace-icon fa fa-user"> </i> Mi cuenta</a></li><li><a href="http://192.168.1.202:88/issues_rss.php?username=Guillermo&amp;key=fWu_ug0ez27ps83NTLiLjjpIr9BYYl_ZQgAZ2MznDlFzChB6D_du-J2DiktkSbM0JdNEQnRKMkozkw8-Nv9f"><i class="ace-icon fa fa-rss-square orange"> </i> RSS</a></li><li class="divider"></li><li><a href="http://192.168.1.202:88/logout_page.php"><i class="ace-icon fa fa-sign-out"> </i> Salir</a></li></ul></li></ul></div></div></div><div class="main-container" id="main-container" style="padding-top: 45px;">
<div id="sidebar" class="sidebar sidebar-fixed responsive compact "><ul class="nav nav-list"><li>
<a href="http://192.168.1.202:88/my_view_page.php">
<i class="menu-icon fa fa-dashboard"></i> 
<span class="menu-text"> Mi Vista </span>
</a>
<b class="arrow"></b>
</li>
<li>
<a href="http://192.168.1.202:88/view_all_bug_page.php">
<i class="menu-icon fa fa-list-alt"></i> 
<span class="menu-text"> Ver incidencias </span>
</a>
<b class="arrow"></b>
</li>
<li>
<a href="http://192.168.1.202:88/bug_report_page.php">
<i class="menu-icon fa fa-edit"></i> 
<span class="menu-text"> Reportar incidencia </span>
</a>
<b class="arrow"></b>
</li>
<li>
<a href="http://192.168.1.202:88/changelog_page.php">
<i class="menu-icon fa fa-retweet"></i> 
<span class="menu-text"> Registro de cambios </span>
</a>
<b class="arrow"></b>
</li>
<li>
<a href="http://192.168.1.202:88/roadmap_page.php">
<i class="menu-icon fa fa-road"></i> 
<span class="menu-text"> Hoja de ruta </span>
</a>
<b class="arrow"></b>
</li>
<li class="active">
<a href="http://192.168.1.202:88/summary_page.php">
<i class="menu-icon fa fa-bar-chart-o"></i> 
<span class="menu-text"> Resumen </span>
</a>
<b class="arrow"></b>
</li>
<li>
<a href="http://192.168.1.202:88/wiki.php?type=project&amp;id=0">
<i class="menu-icon fa fa-book"></i> 
<span class="menu-text"> Wiki </span>
</a>
<b class="arrow"></b>
</li>
<li>
<a href="http://192.168.1.202:88/manage_overview_page.php">
<i class="menu-icon fa fa-gears"></i> 
<span class="menu-text"> Administración </span>
</a>
<b class="arrow"></b>
</li>
</ul><div class="sidebar-toggle sidebar-collapse"><i data-icon2="ace-icon fa fa-angle-double-right" data-icon1="ace-icon fa fa-angle-double-left" class="ace-icon fa fa-angle-double-left"></i></div></div><div class="main-content">
<div id="breadcrumbs" class="breadcrumbs noprint">
<ul class="breadcrumb">
  <li><i class="fa fa-user home-icon active"></i>  <a href="http://192.168.1.202:88/account_page.php">Guillermo ( Guillermo ) </a>
  <span class="label hidden-xs label-default arrowed">administrador</span></li>
</ul>
<div class="nav-recent hidden-xs">Visitadas recientemente: <a href="http://192.168.1.202:88/view.php?id=63" title="[asignada] nutricionista Marcela no puede registrar en HCE ambulatorio">0000063</a>, <a href="http://192.168.1.202:88/view.php?id=86" title="[testing] Ficha de egreso hospital día">0000086</a>, <a href="http://192.168.1.202:88/view.php?id=36" title="[asignada] el registro de Frecuencia cardiaca no queda registrado en cuadricula de enfermeria">0000036</a>, <a href="http://192.168.1.202:88/view.php?id=76" title="[resuelta] Visualización NOI completo" class="resolved">0000076</a>, <a href="http://192.168.1.202:88/view.php?id=84" title="[asignada] No ENVIO de mensajes  a los usuarios que tienen reserva .....">0000084</a></div><div id="nav-search" class="nav-search"><form class="form-search" method="post" action="/jump_to_bug.php"><span class="input-icon"><input name="bug_id" autocomplete="off" class="nav-search-input" placeholder="Incidencia #" type="text"><i class="ace-icon fa fa-search nav-search-icon"></i></span></form></div>
</div>
  <div class="page-content">
<div class="row">
<div class="col-md-12 col-xs-12"><div class="space-20"></div>
<div class="alert alert-danger">
<p class="bold">APPLICATION ERROR #401</p>
<p></p>
<div class="error-info">Utilice el botón «Atrás» de su navegador web 
para volver a la página anterior.  Allí puede corregir los problemas que
 han sido identificados en esta notificación de error o seleccionar otra
 acción.  También puede hacer click sobre una opción de la barra de menú
 para ir directamente a una nueva sección.</div>
	<div class="error-details">
		<hr>
		<h2>Detailed error information</h2>
		<ul>
			<li>Full path:
				<span class="code">
					C:\inetpub\wwwroot\Mantisbt\core\classes\DbQuery.class.php				</span>
			</li>
			<li>Line number:
				<span class="code">293</span>
			</li>
		</ul>
	</div>
	<h3>Stack trace</h3>
		<div class="table-responsive">
			<table class="table table-bordered table-striped table-condensed">
				<tbody><tr>
					<th>#</th>
					<th>Filename</th>
					<th>Line</th>
					<th>Class</th>
					<th>Type</th>
					<th>Function</th>
					<th>Args</th>
				</tr>
<tr>
<td>0</td>
<td>C:\inetpub\wwwroot\Mantisbt\core\classes\DbQuery.class.php</td>
<td>293</td>
<td>-</td>
<td>-</td>
<td>trigger_error</td>
<td>&lt;string&gt;'401', &lt;integer&gt;256</td>
</tr>
<tr>
<td>1</td>
<td>C:\inetpub\wwwroot\Mantisbt\core\classes\DbQuery.class.php</td>
<td>787</td>
<td>DbQuery</td>
<td>-&gt;</td>
<td>db_execute</td>
<td>&lt;integer&gt;-1, &lt;integer&gt;-1</td>
</tr>
<tr>
<td>2</td>
<td>C:\inetpub\wwwroot\Mantisbt\core\database_api.php</td>
<td>313</td>
<td>DbQuery</td>
<td>::</td>
<td>compat_db_query</td>
<td>&lt;string&gt;'SELECT COUNT(DISTINCT(b.id))
				FROM {bug} b
				LEFT JOIN {bug_history} h
				ON b.id = h.bug_id
				AND h.type = 0
				AND h.field_name = \'status\'
				WHERE b.status &gt;= ?
				AND h.old_value &lt; ?
				AND h.new_value &gt;= ?
				AND (? &lt;= date_modified + 86400)
				AND  project_id IN (1,8,5,4)', &lt;array&gt; { [0] =&gt; 80, [1] 
=&gt; 80, [2] =&gt; 80, [3] =&gt; 1530277015 }, &lt;integer&gt;-1, 
&lt;integer&gt;-1, &lt;boolean&gt;true</td>
</tr>
<tr>
<td>3</td>
<td>C:\inetpub\wwwroot\Mantisbt\core\summary_api.php</td>
<td>342</td>
<td>-</td>
<td>-</td>
<td>db_query</td>
<td>&lt;string&gt;'SELECT COUNT(DISTINCT(b.id))
				FROM {bug} b
				LEFT JOIN {bug_history} h
				ON b.id = h.bug_id
				AND h.type = 0
				AND h.field_name = \'status\'
				WHERE b.status &gt;= ?
				AND h.old_value &lt; ?
				AND h.new_value &gt;= ?
				AND (? &lt;= date_modified + 86400)
				AND  project_id IN (1,8,5,4)', &lt;array&gt; { [0] =&gt; 80, [1] =&gt; 80, [2] =&gt; 80, [3] =&gt; 1530277015 }</td>
</tr>
<tr>
<td>4</td>
<td>C:\inetpub\wwwroot\Mantisbt\core\summary_api.php</td>
<td>355</td>
<td>-</td>
<td>-</td>
<td>summary_resolved_bug_count_by_date</td>
<td>&lt;integer&gt;1</td>
</tr>
<tr>
<td>5</td>
<td>C:\inetpub\wwwroot\Mantisbt\summary_page.php</td>
<td>216</td>
<td>-</td>
<td>-</td>
<td>summary_print_by_date</td>
<td>&lt;array&gt; { [0] =&gt; 1, [1] =&gt; 2, [2] =&gt; 3, [3] =&gt; 7, 
[4] =&gt; 30, [5] =&gt; 60, [6] =&gt; 90, [7] =&gt; 180, [8] =&gt; 365 }</td>
</tr>
</tbody></table></div></div></div>	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/bootstrap-3.js"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/moment-with-locales-2.js"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/bootstrap-datetimepicker-4.js"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/typeahead.js"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/list-1.js"></script>
	<script type="text/javascript" src="Resumen%20-%20MantisBT_files/ace.js"></script>


</div></div></div></div></body></html>
Resumen - MantisBT.htm (12,728 bytes)   
dregad

dregad

2018-06-29 10:02

developer   ~0060198

I can't reproduce this on my dev box, but I'm on MySQL. I don't know if it's caused by a data problem or something specific to MSSQL. I don't have access to an sql server environment so I'm afraid there is not much I can do to help. Did you try to manually execute the offending query ?

Also, you have not fully answered my earlier question: what has changed between "the past" and now (upgrades, etc) ? It could be a change in system configuration, database settings...

dregad

dregad

2018-06-29 10:09

developer   ~0060199

@cproensa as a side note, I'm surprised that the 401 error is not printing the offending SQL or even the actual Database query failed. Error received from database was #%1$d: %2$s for the query: %3$s. message - any idea why ?

ghirschy

ghirschy

2018-06-29 11:10

reporter   ~0060200

Also, you have not fully answered my earlier question: what has changed between "the past" and now (upgrades, etc) ? It could be a change in system configuration, database settings...
Nothing was changed, we only used more.

As I see on your previus note you expect to see the final sql query. Is this correct? I Would like to see the final query already "translated" to MSSQL

ghirschy

ghirschy

2018-06-29 11:29

reporter   ~0060201

I found a similar issue created: 0019952: error when click on Summary Link - APPLICATION ERROR 0000401

ghirschy

ghirschy

2018-07-12 08:53

reporter   ~0060254

Hi, any news about it. Can I see the offending query?

cproensa

cproensa

2019-01-07 14:16

developer   ~0061160

example of the query for summary_resolved_bug_count_by_date

SELECT COUNT(DISTINCT(b.id)) FROM mantis_bug_table b LEFT JOIN mantis_bug_history_table h ON b.id = h.bug_id AND h.type = 0 AND h.field_name = 'status' WHERE b.status >= 80 AND h.old_value &lt; 80 AND h.new_value >= 80 AND (1546888303 &lt;= date_modified + 86400) AND project_id IN (1,3,4)

summary works fine out of the box... so i suspect it may be related to some value in a field?

@cproensa as a side note, I'm surprised that the 401 error is not printing the offending SQL or even the actual Database query failed. Error received from database was #%1$d: %2$s for the query: %3$s. message - any idea why ?

i don't know, if i could reproduce it, then i could investigate.

Issue History

Date Modified Username Field Change
2018-06-28 08:57 ghirschy New Issue
2018-06-28 18:52 dregad Status new => feedback
2018-06-28 18:52 dregad Note Added: 0060191
2018-06-29 08:20 ghirschy File Added: Mantis.PNG
2018-06-29 08:20 ghirschy Note Added: 0060195
2018-06-29 08:20 ghirschy Status feedback => new
2018-06-29 08:45 atrol Relationship added related to 0019952
2018-06-29 08:46 dregad Note Added: 0060196
2018-06-29 08:46 dregad Status new => feedback
2018-06-29 09:03 ghirschy File Added: Resumen - MantisBT.htm
2018-06-29 09:03 ghirschy Note Added: 0060197
2018-06-29 09:03 ghirschy Status feedback => new
2018-06-29 10:02 dregad Status new => feedback
2018-06-29 10:02 dregad Note Added: 0060198
2018-06-29 10:09 dregad Note Added: 0060199
2018-06-29 11:10 ghirschy Note Added: 0060200
2018-06-29 11:10 ghirschy Status feedback => new
2018-06-29 11:29 ghirschy Note Added: 0060201
2018-07-12 08:53 ghirschy Note Added: 0060254
2019-01-07 14:16 cproensa Note Added: 0061160