View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004725 | mantisbt | bugtracker | public | 2004-10-15 19:51 | 2004-11-06 06:01 |
Reporter | jferraz | Assigned To | thraxisp | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | git trunk | ||||
Fixed in Version | 0.19.1 | ||||
Summary | 0004725: (0001466) Broken HTML / Misaligned links on top of view pages | ||||
Description | The fix for 0001466 caused the bug_view_page.php and bug_view_advanced_page.php to generate broken HTML code. When we have a bug list, the generated page contains (the title of the table): <!-- Title -->(i.e. a td tag nested into another td tag). When we don't have a bug list, the links section appears misaligned, since the table contains 6 columns, the title has colspan=3 and links has colspan=2 (one spare column is missed). | ||||
Additional Information | Refer to cvs diffs:
Please, someone with proper privileges link this bug to 0001466. Perhaps it should also be child of 0004297 (it is up to you). | ||||
Tags | No tags attached. | ||||
Attached Files | 4725.patch (6,050 bytes)
Index: bug_view_advanced_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_view_advanced_page.php,v retrieving revision 1.65 diff -U4 -p -r1.65 bug_view_advanced_page.php --- bug_view_advanced_page.php 16 Oct 2004 15:32:26 -0000 1.65 +++ bug_view_advanced_page.php 16 Oct 2004 17:16:28 -0000 @@ -39,8 +39,10 @@ html_page_top2(); $t_access_level_needed = config_get( 'view_history_threshold' ); $t_can_view_history = access_has_bug_level( $t_access_level_needed, $f_bug_id ); + + $t_bugslist = gpc_get_cookie( config_get( 'bug_list_cookie' ), false ); ?> <br /> <table class="width100" cellspacing="1"> @@ -48,9 +50,9 @@ <tr> <!-- Title --> - <td class="form-title" colspan="3"> + <td class="form-title" colspan="<?php echo $t_bugslist ? '3' : '4' ?>"> <?php echo lang_get( 'viewing_bug_advanced_details_title' ) ?> <!-- Jump to Bugnotes --> <span class="small"><?php print_bracket_link( "#bugnotes", lang_get( 'jump_to_bugnotes' ) ) ?></span> @@ -66,22 +68,22 @@ <?php } ?> </td> - <!-- prev/next links --> - <?php if( $t_bugslist = gpc_get_cookie( 'bugslist', false ) ) { ?> - <td class="center"><span class="small"> - <?php - $t_bugslist = explode( ',', $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], '<<' ); - if( isset( $t_bugslist[$t_index+1] ) ) print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index+1], '>>' ); - } - ?> - </span></td> - <?php } ?> - </td> + + <!-- prev/next links --> + <?php if( $t_bugslist ) { ?> + <td class="center"><span class="small"> + <?php + $t_bugslist = explode( ',', $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_advanced_page.php?bug_id='.$t_bugslist[$t_index-1], '<<' ); + if( isset( $t_bugslist[$t_index+1] ) ) print_bracket_link( 'bug_view_advanced_page.php?bug_id='.$t_bugslist[$t_index+1], '>>' ); + } + ?> + </span></td> + <?php } ?> <!-- Links --> <td class="right" colspan="2"> Index: bug_view_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_view_page.php,v retrieving revision 1.69 diff -U4 -p -r1.69 bug_view_page.php --- bug_view_page.php 16 Oct 2004 15:32:26 -0000 1.69 +++ bug_view_page.php 16 Oct 2004 17:16:28 -0000 @@ -37,8 +37,10 @@ $t_access_level_needed = config_get( 'view_history_threshold' ); $t_can_view_history = access_has_bug_level( $t_access_level_needed, $f_bug_id ); compress_enable(); + + $t_bugslist = gpc_get_cookie( config_get( 'bug_list_cookie' ), false ); ?> <?php html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ) ?> <?php html_page_top2() ?> @@ -48,9 +50,9 @@ <tr> <!-- Title --> - <td class="form-title" colspan="3"> + <td class="form-title" colspan="<?php echo $t_bugslist ? '3' : '4' ?>"> <?php echo lang_get( 'viewing_bug_simple_details_title' ) ?> <!-- Jump to Bugnotes --> <span class="small"><?php print_bracket_link( "#bugnotes", lang_get( 'jump_to_bugnotes' ) ) ?></span> @@ -66,22 +68,22 @@ <?php } ?> </td> - <!-- prev/next links --> - <?php if( $t_bugslist = gpc_get_cookie( 'bugslist', false ) ) { ?> - <td class="center"><span class="small"> - <?php - $t_bugslist = explode( ',', $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], '<<' ); - if( isset( $t_bugslist[$t_index+1] ) ) print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index+1], '>>' ); - } - ?> - </span></td> - <?php } ?> - </td> + + <!-- prev/next links --> + <?php if( $t_bugslist ) { ?> + <td class="center"><span class="small"> + <?php + $t_bugslist = explode( ',', $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], '<<' ); + if( isset( $t_bugslist[$t_index+1] ) ) print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index+1], '>>' ); + } + ?> + </span></td> + <?php } ?> <!-- Links --> <td class="right" colspan="2"> Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v retrieving revision 1.218 diff -U4 -p -r1.218 config_defaults_inc.php --- config_defaults_inc.php 13 Oct 2004 12:20:35 -0000 1.218 +++ config_defaults_inc.php 16 Oct 2004 17:16:29 -0000 @@ -1087,8 +1087,9 @@ $g_project_cookie = $g_cookie_prefix.'_PROJECT_COOKIE'; $g_view_all_cookie = $g_cookie_prefix.'_VIEW_ALL_COOKIE'; $g_manage_cookie = $g_cookie_prefix.'_MANAGE_COOKIE'; $g_logout_cookie = $g_cookie_prefix.'_LOGOUT_COOKIE'; + $g_bug_list_cookie = $g_cookie_prefix.'_BUG_LIST_COOKIE'; ####################################### # Mantis Filter Variables ####################################### Index: view_all_bug_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/view_all_bug_page.php,v retrieving revision 1.55 diff -U4 -p -r1.55 view_all_bug_page.php --- view_all_bug_page.php 25 Sep 2004 13:34:25 -0000 1.55 +++ view_all_bug_page.php 16 Oct 2004 17:16:29 -0000 @@ -38,9 +38,9 @@ for($i=0; $i < sizeof( $rows ); $i++) { array_push($t_bugslist, $rows[$i]["id"] ); } - gpc_set_cookie( 'bugslist', implode( ',', $t_bugslist ) ); + gpc_set_cookie( config_get( 'bug_list_cookie' ), implode( ',', $t_bugslist ) ); compress_enable(); html_page_top1( lang_get( 'view_bugs_link' ) ); | ||||
Fixed in CVS. There was a missing (/td) tag. |
|
Now we have two consecutive (/td) tags, and still have misaligned cell when there is no bug list... |
|
Even more bugs found:
|
|
Attached suggested patch (4725.patch). Bugs fixed:
Hope these were the only bugs caused by 0001466... Someone wasn't on his best day... :-P |
|
patch submitted to CVS. |
|