View Issue Details

IDProjectCategoryView StatusLast Update
0028618mantisbtbugtrackerpublic2021-06-05 10:37 Assigned Todregad  
Status resolvedResolutionfixed 
OSWindowsOS Version10 
Product Version2.24.4 
Target Version2.26.0Fixed in Version2.26.0 
Summary0028618: Category empty but required does not prevent form submission on Firefox Windows and Safari

On the "Enter Issue Details" form, the "Category" select input is a required field. As such it has a required HTML5 attribute which prevents form submission when no option was selected.

However, when using Firefox on Windows and Safari browsers, the form can be submitted with no category selected resulting in an error telling the user he can go back using the browser "Back" button. But in this case, the form content is lost...

The bug is due to the "empty" / "select" option having a value="0". The value should be value="" instead.

The fix is the following:
line 769 in file core/print_api.php:
// GZ FJ fix required Category select in Firefox Windows.
// echo '<option value="0" disabled hidden';
echo '<option value=""';

Related issue:

Steps To Reproduce

Use Firefox on Windows and Safari browsers and do not select a "Category".

TagsNo tags attached.


related to 0026686 closeddregad Make category on bug_report_page a required field when $g_allow_no_category = OFF; 


Related Changesets

MantisBT: master 407d0fd9

2021-05-24 12:53:33


Details Diff
Let browser handle required category field

Proper empty default value on SELECT, lets the browser catch the error
without actually submitting the form.

Fixes 0028618
Affected Issues
mod - core/print_api.php Diff File