View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026477 | mantisbt | ui | public | 2019-12-17 17:15 | 2024-01-11 05:01 |
Reporter | polzin | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Product Version | 2.22.2 | ||||
Summary | 0026477: Removing the caching of pages with validation gives returns the "empty form on back" bug 0003728 | ||||
Description | For v2.22, 0025969 the forced caching of certain pages (bug_change_status_page.php, bug_report_page.php, bug_update_page.php) was removed. This returns the "empty form on back" bug 0003728. The best ui would be to have some javascript that does a check first when pressing the submit button. In general, I have the feeling that "$g_allow_browser_cache" should not be an option in config_defaults_inc, because with this setting ON, a lot of weired things are happening. But for the mentioned pages it is valuable, as long as a pre-submit-javascript check is not possible. | ||||
Steps To Reproduce | What I have done:
| ||||
Tags | No tags attached. | ||||
i think that the main problem of caching those pages is that it caused a greater bad than good.
I'm not sure on what conditions, (previously to that point in time of those changes), the back navigation would have worked in presenting the previous form values. May be because of some combination of the headers, or some specific behaviour of browsers when presented with the incosistent headers? FYI: currently, some browsers do effectively cache the form inputs. IIRC Chrome in my experience does this. Firefox in the other hand, don't. This is a internal behaviour of the browser, that is caching the form inputs, not the whole page.
What is the point in pre-submit processing regarding the back navigation and losing the input fields? |
|
@cproensa The reason for using "back" is that some form validation issued an error, e.g. mandatory field not set. This is something that happens frequently and should not make you loose all your input. |
|
Any suggestion how to proceed on that? |
|
I unfortunately do not have a solution for the form fields being cleared when hitting the back button. The problem is somewhat mitigated by the use of HTML 5 required attribute on the mandatory fields (see 0022310), which actually prevent form submission when fields are empty. Other validation errors are still affected though. |
|