View Issue Details

IDProjectCategoryView StatusLast Update
0020352mantisbtuipublic2016-06-12 00:43
ReporterFilippoAssigned Todregad 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-beta.1 
Target Version1.3.0-rc.2Fixed in Version1.3.0-rc.2 
Summary0020352: bug_report_page.php is broken when 'attachments' field is hidden
Description

My local installation of Mantis BT, after upgrading to 1.3.0-rc.1, show a broken bug_report_page.php
The final part of the form is screwed up as youn can see in the attached image (note that I have two custom fields in this form).

TagsNo tags attached.

Relationships

has duplicate 0020361 closedatrol Report issue page display unexpected, html layout issue 

Activities

Filippo

Filippo

2015-12-07 05:52

reporter  

Immagine.png (25,603 bytes)
Immagine.png (25,603 bytes)
dregad

dregad

2015-12-07 08:21

developer   ~0052039

Greetings,

I am not able to reproduce this issue on a fresh install of 1.3.0-rc.1.

Looking at your screenshot, I'm not seeing 2 standard fields "Steps To Reproduce" and "Additional Information", did you customize MantisBT ?

From what version did you upgrade ?

Filippo

Filippo

2015-12-07 10:15

reporter   ~0052043

I've a standard version of Mantis. I've only changed config.inc in order to hide those 2 fields. As you can see, there are also 2 custom fields ("Cliente" and "Ore stimate"), that I added with the normal interface of Mantis.
I've upgraded Mantis from 1.2 to 1.3 beta and after upgraded to 1.3 RC.
I had this issue also on 1.3 beta, but I thought it could be normal on the beta version and so I decided to wait the RC version to see if it was fixed.
I'm attaching the resulting html part of the page, if it can help you.



Nuova anomalia - FB Bug Tracker.htm (15,644 bytes)
atrol

atrol

2015-12-07 10:34

developer   ~0052044

Filippo,
when visiting your Mantis installation I noticed that you use changed CSS.
Are you able to reproduce the issue using our original CSS?

Filippo

Filippo

2015-12-07 10:37

reporter   ~0052045

Yes, absolutely, I had the problem also with the standard css.

dregad

dregad

2015-12-07 10:40

developer   ~0052046

I've only changed config.inc in order to hide those 2 fields.

I tried that too, but I'm not seeing these artifacts here.
Tested on Firefox , Chrome 46 and IE 10.

I'll have a look at the provided html and see if I can find the cause there.

I had this issue also on 1.3 beta, but I thought it could be normal on the beta
version and so I decided to wait the RC version to see if it was fixed.

The beta is there to let users test things, in the hope they will let us know when something's wrong, so ideally you could (should) have reported this earlier.

Filippo

Filippo

2015-12-07 10:50

reporter   ~0052047

You're right, in fact I'm gonna report some other little bug (for example, a problme regarding the administrator e-mail link not showing correctly in the footer with the italian translation).

dregad

dregad

2015-12-07 11:10

developer   ~0052049

Last edited: 2015-12-07 11:11

View 2 revisions

OK, so looking at the HTML, I see

  • an extra label-style 'span' at the bottom of the fieldset (line 202), which does not make any sense by itself. Normally this should be associated with a label and an input span within a field-container div. Note that this default CSS this causes a purple rectangle to overlapp all of the left-hand side of the "Enter Report Details" div (hiding the horizontal delimiters between each line.

  • below the form-container div, there are 2 additional field-container divs. These should normally be contained within the field-container div's fieldset

    • Visibilità (line 204)
    • Rimani sul report (line 212)
  • an isolated submit-button span (line 220) which should also be within the fieldset

If I move the </fieldset></form></div> (line 203) below the submit-button span (line 223) and remove the isolated label-style span (line 202), then the page displays properly.

I can only explain this by customized code. Even the HTML layout does not match what is generated by the PHP script. Are you absolutely sure you did not modify bug_report_page.php in any way ?

Filippo

Filippo

2015-12-07 11:21

reporter   ~0052050

Believe me, I didn't touch any php file. If you want, I can attach all the mantis directory of my website.
Moreover, everytime I did an upgrade, I renamed the old "mantis" folder, so the uploaded version is a fresh version.
Let me know if you need a copy of my mantis folder and if you need some other informations.
Thanks.

Filippo

Filippo

2015-12-07 11:22

reporter   ~0052051

I filed another bug regarding an "html corruption" with the italian translation of mantis. Could it be the case for this bug too?
Sorry form my English.

atrol

atrol

2015-12-07 11:57

developer   ~0052054

Could it be the case for this bug too?
You can check this quite easy.
Change your language settings under Account > Modifica preferenze to English

Filippo

Filippo

2015-12-07 12:06

reporter   ~0052056

Same problem with english version.
:-(



English version.png (53,729 bytes)
English version.png (53,729 bytes)
dregad

dregad

2015-12-07 12:15

developer   ~0052057

Believe me, I didn't touch any php file

Sorry but I cannot think of any other way to explain the differences in generated HTML. Do you apply any javascript / jQuery ?

If you want, I can attach all the mantis directory of my website.

Not the whole directory if you assure me it is standard MantisBT, but for sure the config file(s) and any other customization you may have done.

For the record: this is your file


</div>

            <span class="label-style"></span>
        </fieldset></form></div>
        <div class="field-container">
            <label><span>Visibilità</span></label>
            <span class="input">
                <label><input tabindex="16" name="view_state" value="10" checked="checked" type="radio"> pubblico</label>
                <label><input tabindex="17" name="view_state" value="50" type="radio"> privato</label>
            </span>
            <span class="label-style"></span>
        </div>
        <div class="field-container">
            <label><span>Rimani sul report</span></label>
            <span class="input">
                <label><input tabindex="18" id="report_stay" name="report_stay" type="checkbox"> attiva per notificare più anomalie</label>
            </span>
            <span class="label-style"></span>
        </div>

        <span class="submit-button">
            <input tabindex="19" class="button" value="Invia la segnalazione" type="submit">
        </span>

</div>

And this is what I get from a standard install:


</div>
<div class="field-container">
<label><span>View Status</span></label>
<span class="input">
<label><input tabindex="13" type="radio" name="view_state" value="10" checked="checked" /> public</label>
<label><input tabindex="14" type="radio" name="view_state" value="50" /> private</label>
</span>
<span class="label-style"></span>
</div>
<div class="field-container">
<label><span>Report Stay</span></label>
<span class="input">
<label><input tabindex="15" type="checkbox" id="report_stay" name="report_stay" /> check to report more issues</label>
</span>
<span class="label-style"></span>
</div>

        <span class="submit-button">
            <input tabindex="16" type="submit" class="button" value="Submit Report" />
        </span>
    </fieldset>
</form>

</div>

Filippo

Filippo

2015-12-07 12:27

reporter   ~0052059

Here is it my config.inc file.
Note that $g_hostname, $g_db_username, $g_db_password and $g_crypto_master_salt are obscured.



config_inc.php (4,532 bytes)
<?php
  $g_hostname = 'xxx.xxx.xxx.xxx';
  $g_db_type = 'mysql';
  $g_database_name = 'xxxxxxxxxxxxx';
  $g_db_username = 'xxxxxxxxxxxxx';
  $g_db_password = 'xxxxxxxxxxxx';
  $g_allow_signup = OFF;
  $g_send_reset_password  = ON;
  $g_lost_password_feature = OFF;
  $g_default_language = 'italian';
  $g_window_title = 'FB Bug Tracker';
  $g_manual_url = 'http://www.probussrl.it/mantis/';
  $g_enable_project_documentation = OFF;
  $g_show_footer_menu  	= OFF;
  $g_status_legend_position       = STATUS_LEGEND_POSITION_BOTTOM;
  $g_filter_position      = FILTER_POSITION_TOP;
  $g_show_queries_count   = OFF;
  $g_my_view_bug_count = 8;
  $g_logo_image = 'images/logo.png';
  $g_favicon_image = 'images/favicon.ico';
  $g_my_view_boxes = array (
              'assigned'      => '1',
              'feedback'      => '2',
              'recent_mod'    => '3',
              'reported'      => '4',
              'unassigned'    => '5',
              'monitored'     => '6',
              'resolved'      => '7',
              'verify'        => '8');
  $g_short_date_format    = 'd M Y';
  $g_normal_date_format   = 'd M Y H:i';
  $g_complete_date_format = 'd M Y H:i T';
  $g_status_colors                = array(
          'new'                  => '#f8f8ff', 
          'feedback'             => '#c4f8ba', 
          'acknowledged'         => '#ffffb0', 
          'confirmed'            => '#E6C44F', 
          'assigned'             => '#A7BFED', 
          'resolved'             => '#8ACA8A', 
          'closed'               => '#679867'); 

  $g_default_bug_severity = FEATURE;
  $g_default_bug_reproducibility = REPRODUCIBILITY_NOTAPPLICABLE;
  $g_display_bug_padding          = 4;
  $g_enable_email_notification    = ON;

  # select the method to mail by:
      # 0 - mail()
      # 1 - sendmail
      # 2 - SMTP
  $g_phpMailer_method             = 0;
  $g_administrator_email  = 'info@probussrl.it';
  $g_webmaster_email              = 'info@probussrl.it';

  # the sender email, part of 'From: ' header in emails
  $g_from_email                   = 'info@probussrl.it';
  
  # the sender name, part of 'From: ' header in emails
  $g_from_name                    = 'FB Bug Tracker';

  # the return address for bounced mail
  $g_return_path_email    = 'info@probussrl.it';
  $g_view_issues_page_columns = array ( 'selection', 'id', 'summary', 'priority', 'category_id', 'handler_id', 'last_updated' );
  $g_print_issues_page_columns = array ( 'id', 'summary', 'description', 'category_id', 'severity', 'resolution' );

  $g_bug_report_page_fields = array(
    'category_id',
    'view_state',
    'handler',
    'priority',
    'severity',
    'reproducibility',
    'platform',
    'os',
    'os_version',
    'product_version',
    'product_build',
    'target_version',
    'summary',
    'description'
  );
  $g_bug_view_page_fields = array (
    'id',
    'project',
    'category_id',
    'view_state',
    'date_submitted',
    'last_updated',
    'reporter',
    'handler',
    'priority',
    'severity',
    'reproducibility',
    'status',
    'resolution',
    'projection',
    'platform',
    'os',
    'os_version',
    'product_version',
    'product_build',
    'target_version',
    'fixed_in_version',
    'summary',
    'description',
    'attachments',
    'tags'
  );
  $g_bug_update_page_fields = array (
    'id',
    'project',
    'category_id',
    'view_state',
    'date_submitted',
    'last_updated',
    'reporter',
    'handler',
    'priority',
    'severity',
    'reproducibility',
    'status',
    'resolution',
    'projection',
    'platform',
    'os',
    'os_version',
    'product_version',
    'product_build',
    'target_version',
    'fixed_in_version',
    'summary',
    'description',
    'attachments',
  );
	$g_bug_change_status_page_fields = array (
		'id',
		'project',
		'category_id',
		'view_state',
		'date_submitted',
		'last_updated',
		'reporter',
		'handler',
		'priority',
		'severity',
		'reproducibility',
		'status',
		'resolution',
		'projection',
		'platform',
		'os',
		'os_version',
		'product_version',
		'product_build',
		'target_version',
		'fixed_in_version',
		'summary',
		'description',
		'attachments',
		'tags',
	);
	$g_time_tracking_enabled = ON;
  $g_crypto_master_salt = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
  $g_default_bug_relationship_clone = BUG_BLOCKS;
?>
config_inc.php (4,532 bytes)
Filippo

Filippo

2015-12-07 12:29

reporter   ~0052060

I didn't include my custom css file because I've the same problem with the original css.
Nothing else has been changed.

atrol

atrol

2015-12-08 01:56

developer   ~0052068

@Filippo,
which PHP version do you use?
The reporter of the duplicate 0020361 uses the brand new 7.0.0.

Filippo

Filippo

2015-12-08 02:37

reporter   ~0052069

At this moment I don't remember (I'll check later), but I'm pretty sure that it's 5.6.

Filippo

Filippo

2015-12-08 04:36

reporter   ~0052071

OK, I've checked my PHP version. It's 5.6.3
My webserver hosting provider lets me choose PHP version between the following ones:

5.2.14
5.4.35
5.5.19
5.6.3

I'll try all these versions and will report you if there are any differences.

Filippo

Filippo

2015-12-08 04:40

reporter   ~0052072

I've tested all PHP versions from 5.2.14 to 5.6.3.
With the first one, Mantis doesn't work at all.
With all the other ones, I've the same problem.

atrol

atrol

2015-12-08 06:11

developer   ~0052074

Could you please check if changing line 370 in core/cfdefs/cfdef_standard.php

from
    echo ' value="' . string_attribute( $p_custom_field_value ) .'"></input>';
to
    echo ' value="' . string_attribute( $p_custom_field_value ) .'" />';

fixes the issue?

Filippo

Filippo

2015-12-08 06:37

reporter   ~0052075

No, it doesn't.
Attaching new html output.



Nuova anomalia - FB Bug Tracker rev 2.htm (15,992 bytes)
dregad

dregad

2015-12-08 08:32

developer   ~0052076

OK, I got it.

The problem occurs when hiding the 'attachments' field (in $g_bug_report_page_fields - did not test for others yet)

Related Changesets

MantisBT: master 9e9433a9

2015-12-08 08:54:20

dregad

Details Diff
Fix HTML with hidden 'attachments' fields in report_page.php

When the 'attachments' field is hidden from the Report Issue page (via
$g_bug_report_page_fields config option), the code generated invalid
HTML which caused a display artifact.

Fixes 0020352
mod - bug_report_page.php Diff File

Issue History

Date Modified Username Field Change
2015-12-07 05:52 Filippo New Issue
2015-12-07 05:52 Filippo File Added: Immagine.png
2015-12-07 08:21 dregad Status new => feedback
2015-12-07 08:21 dregad Note Added: 0052039
2015-12-07 10:15 Filippo File Added: Nuova anomalia - FB Bug Tracker.htm
2015-12-07 10:15 Filippo Note Added: 0052043
2015-12-07 10:15 Filippo Status feedback => new
2015-12-07 10:34 atrol Status new => feedback
2015-12-07 10:34 atrol Note Added: 0052044
2015-12-07 10:37 Filippo Note Added: 0052045
2015-12-07 10:37 Filippo Status feedback => new
2015-12-07 10:40 dregad Note Added: 0052046
2015-12-07 10:40 dregad Status new => acknowledged
2015-12-07 10:50 Filippo Note Added: 0052047
2015-12-07 11:10 dregad Note Added: 0052049
2015-12-07 11:11 dregad Note Edited: 0052049 View Revisions
2015-12-07 11:21 Filippo Note Added: 0052050
2015-12-07 11:22 Filippo Note Added: 0052051
2015-12-07 11:57 atrol Status acknowledged => feedback
2015-12-07 11:57 atrol Note Added: 0052054
2015-12-07 12:06 Filippo File Added: English version.png
2015-12-07 12:06 Filippo Note Added: 0052056
2015-12-07 12:06 Filippo Status feedback => new
2015-12-07 12:15 dregad Note Added: 0052057
2015-12-07 12:27 Filippo File Added: config_inc.php
2015-12-07 12:27 Filippo Note Added: 0052059
2015-12-07 12:29 Filippo Note Added: 0052060
2015-12-08 01:53 atrol Relationship added has duplicate 0020361
2015-12-08 01:56 atrol Status new => feedback
2015-12-08 01:56 atrol Note Added: 0052068
2015-12-08 02:37 Filippo Note Added: 0052069
2015-12-08 02:37 Filippo Status feedback => new
2015-12-08 04:36 Filippo Note Added: 0052071
2015-12-08 04:40 Filippo Note Added: 0052072
2015-12-08 06:11 atrol Status new => feedback
2015-12-08 06:11 atrol Note Added: 0052074
2015-12-08 06:37 Filippo File Added: Nuova anomalia - FB Bug Tracker rev 2.htm
2015-12-08 06:37 Filippo Note Added: 0052075
2015-12-08 06:37 Filippo Status feedback => new
2015-12-08 08:32 dregad Status new => confirmed
2015-12-08 08:32 dregad Note Added: 0052076
2015-12-08 09:51 dregad Product Version 1.3.0-rc.1 => 1.3.0-beta.1
2015-12-08 09:51 dregad Target Version => 1.3.0-rc.2
2015-12-08 09:51 dregad Assigned To => dregad
2015-12-08 09:51 dregad Status confirmed => assigned
2015-12-08 10:25 dregad Changeset attached => MantisBT master 9e9433a9
2015-12-08 10:25 dregad Status assigned => resolved
2015-12-08 10:25 dregad Resolution open => fixed
2015-12-08 10:25 dregad Fixed in Version => 1.3.0-rc.2
2015-12-08 10:27 dregad Summary bug_report_page.php is broken on my MantisBT installation => bug_report_page.php is broken when 'attachments' field is hidden
2016-06-12 00:43 vboctor Status resolved => closed