View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013124 | mantisbt | time tracking | public | 2011-07-06 09:29 | 2014-09-23 18:05 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.5 | ||||
Target Version | 1.2.6 | Fixed in Version | 1.2.6 | ||
Summary | 0013124: Getting time tracking info yields application error | ||||
Description | After navigating between issues from a filtered list (using the << and >> links at the top of the View Issue Details page), the "Get Time Tracking Information" button returns an error APPLICATION ERROR #200 | ||||
Steps To Reproduce |
| ||||
Additional Information | The error does not occur when the bug is accessed directly by a link (e.g. from the "Recently Visited" list or the "View Issues" page. | ||||
Tags | patch | ||||
Attached Files | Fix-13124-for-1.3.x.patch (1,200 bytes)
From 7dc84cd115c39e56ff8d08174c71b2a65af59314 Mon Sep 17 00:00:00 2001 From: Damien Regad <damien.regad@merckgroup.com> Date: Mon, 11 Jul 2011 11:08:51 +0200 Subject: [PATCH] Fix #13124: Getting time tracking info yields application error Replace occurences of bug_view_page.php by view.php --- bug_view_inc.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bug_view_inc.php b/bug_view_inc.php index 570b4be..6c066ae 100644 --- a/bug_view_inc.php +++ b/bug_view_inc.php @@ -286,11 +286,11 @@ if ( $t_bugslist ) { $t_index = array_search( $f_bug_id, $t_bugslist ); if ( false !== $t_index ) { if ( isset( $t_bugslist[$t_index-1] ) ) { - print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index-1], '<<', false, 'previous-bug' ); + print_bracket_link( 'view.php?bug_id='.$t_bugslist[$t_index-1], '<<', false, 'previous-bug' ); } if ( isset( $t_bugslist[$t_index+1] ) ) { - print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index+1], '>>', false, 'next-bug' ); + print_bracket_link( 'view.php?bug_id='.$t_bugslist[$t_index+1], '>>', false, 'next-bug' ); } } echo '</span></td>'; -- 1.7.4.1 | ||||
I have narrowed the problem down to the form in the bugnotestats section in bugnote_stats_inc.php. The post action for this is "form_action_self" which, depending on the circumstances, can be either view.php (direct link to bug) or bug_view_page.php (navigation). The form has a hidden input parameter called "id" which is set to the current bug's id.
So I guess that a quick and dirty workaround for this issue could be implemented as one of the options below: a) define both parameters (id and bug_id) for the form in bugnote_stats_inc.php However, before making any changes, I would like to understand why we have two php scripts doing seemingly the same thing but using different parameters, and why one is used vs the other under some circumstances. Assuming both scripts indeed serve the same purpose and there is no particular reason for having both of them except legacy, and considering that bug_view_page.php is only referenced 4 times in the code (comments excluded), it seems to me that the best way to go would be to get rid of it in favor of view.php. |
|
As discussed on mailing list, patch limited to the fix is attached for 1.2.x and 1.3.x. With regards to removing all references to bug_view_page.php, I left things as they are for now, based on feedback from dhx: The string_get_bug_page(...) function seems to be unused [...] For 1.2.x I would say it is best to leave it as-is in case a plugin relies upon it. For 1.3.x, the function can be removed entirely as well as the functions that depends on it. For the switch statement in set_project.php [...] For 1.3.x I think it needs to be mostly rewritten. I will leave implementation of these changes in 1.3.x to someone having more experienced than I. |
|
Thanks Damien, patch applied. |
|
The patch for 1.3.x I provided was incorrect, as it was not updating the parameter to view.php from bug_id to id. That patch was also wrongly applied to 1.2.x. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master-1.2.x c3b2321e 2011-07-08 05:04 Damien Regad Details Diff |
Fix 0013124: Getting time tracking info yields application error Replace occurences of bug_view_page.php by view.php |
Affected Issues 0013124 |
|
mod - bug_view_inc.php | Diff File | ||
MantisBT: master 95b9991d 2011-07-11 05:08 Damien Regad Committer: dhx Details Diff |
Fix 0013124: Getting time tracking info yields application error Replace occurences of bug_view_page.php by view.php Signed-off-by: David Hicks <d@hx.id.au> |
Affected Issues 0013124 |
|
mod - bug_view_inc.php | Diff File | ||
MantisBT: master-1.2.x d1d05b91 2011-07-11 05:08 Damien Regad Committer: dhx Details Diff |
Fix 0013124: Getting time tracking info yields application error Replace occurences of bug_view_page.php by view.php Signed-off-by: David Hicks <d@hx.id.au> |
Affected Issues 0013124 |
|
mod - bug_view_inc.php | Diff File | ||
MantisBT: master-1.2.x 43e1a19d 2011-07-13 03:12 Damien Regad Details Diff |
Revert "Fix 0013124: Getting time tracking info yields application error" This reverts commit d1d05b91dfecbf0b04d5bc373628aac0b6199d72. |
Affected Issues 0013124 |
|
mod - bug_view_inc.php | Diff File | ||
MantisBT: master 799cbc9c 2011-07-13 03:16 Damien Regad Details Diff |
Revert "Fix 0013124: Getting time tracking info yields application error" This reverts commit 95b9991dd5496b408f1fa68da5ee22f85a1b1664. |
Affected Issues 0013124 |
|
mod - bug_view_inc.php | Diff File | ||
MantisBT: master f713210f 2011-07-13 03:20 Damien Regad Details Diff |
Fix 0013124: Getting time tracking info yields application error Replace occurences of bug_view_page.php by view.php |
Affected Issues 0013124 |
|
mod - bug_view_inc.php | Diff File |