View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009323 | mantisbt | bugtracker | public | 2008-07-01 06:04 | 2013-11-02 04:45 |
Reporter | polzin | Assigned To | jreese | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.2 | ||||
Target Version | 1.1.3 | Fixed in Version | 1.1.3 | ||
Summary | 0009323: Browser caching broken since 1.1.2 | ||||
Description | Since I upgraded from 1.1.1 to 1.1.2 browser caching does not work any longer.
In 1.1.1 the page is immediately displayed and the scroll-position and the entered text is preserved. In 1.2.0a (and in 1.1.2 at my site) the page is reloaded, the scroll-position and entered text is gone. I believe, the reason is that in 1.1.2 core.php requires session_api.php. And session_init() stops caching. To prevent that, one can use session_cache_limiter, see patch and links. http://www.php.net/manual/en/function.session-start.php#70033 BTW: I noticed that sessions_api.php has no "?>" at the end of the file. I am not a php programmer and I am unsure if this is right, as some *_api.php have it, other haven't. | ||||
Tags | patch | ||||
Attached Files | session.patch (515 bytes)
Index: core/session_api.php =================================================================== RCS file: /cvs/TPS/mantis/core/session_api.php,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 session_api.php --- core/session_api.php 2 Jun 2008 17:23:29 -0000 1.1.1.1 +++ core/session_api.php 1 Jul 2008 10:02:45 -0000 @@ -49,6 +49,7 @@ */ class MantisPHPSession extends MantisSession { function __construct() { + session_cache_limiter('private_no_expire'); session_start(); $this->id = session_id(); } bug_report_page.patch (1,828 bytes)
Index: bug_report_page.php =================================================================== --- bug_report_page.php +++ bug_report_page.php @@ -106,12 +106,43 @@ html_page_top1( lang_get( 'report_bug_link' ) ); html_page_top2(); - print_recently_visited(); -?> - + print_recently_visited(); + + // array with language dependent error messages + // used for example in javascript error messages + $MANTIS_ERROR = lang_get('MANTIS_ERROR'); +?> +<?php if ( ON == config_get( 'use_javascript' ) ) { ?> +<script type="text/javascript" language="JavaScript"> +<!-- + function checkReportBugForm(theForm) + { + if (theForm.category.value=='') + { + theForm.category.focus(); + alert('<?php echo sprintf(addslashes($MANTIS_ERROR[ERROR_EMPTY_FIELD]),lang_get( 'category' ))?>'); + return false; + } + if (theForm.summary.value=='') + { + theForm.summary.focus(); + alert('<?php echo sprintf(addslashes($MANTIS_ERROR[ERROR_EMPTY_FIELD]),lang_get( 'summary' ))?>'); + return false; + } + if (theForm.description.value=='') + { + theForm.description.focus(); + alert('<?php echo sprintf(addslashes($MANTIS_ERROR[ERROR_EMPTY_FIELD]),lang_get( 'description' ))?>'); + return false; + } + return true; + } +// --> +</script> +<?php } ?> <br /> <div align="center"> -<form name="report_bug_form" method="post" <?php if ( file_allow_bug_upload() ) { echo 'enctype="multipart/form-data"'; } ?> action="bug_report.php"> +<form name="report_bug_form" method="post" <?php if ( file_allow_bug_upload() ) { echo 'enctype="multipart/form-data"'; } ?> action="bug_report.php" <?php if ( ON == config_get( 'use_javascript' ) ) { ?>onsubmit="return checkReportBugForm(this);"<?php } ?>> <table class="width75" cellspacing="1"> | ||||
has duplicate | 0009366 | closed | ryandesign | Page content in 'Report Issue' is forgotten when user clicks [Back] button in browser |
has duplicate | 0006736 | closed | jreese | Mantis - application error #11 |
has duplicate | 0009569 | closed | jreese | Pages will not refresh in IE6 |
has duplicate | 0009631 | closed | ryandesign | Loss of data on back.. |
has duplicate | 0009554 | closed | jreese | Within a proxy enviroment users get the screens of other users |
has duplicate | 0009655 | closed | ryandesign | Forms > Informations not saved |
has duplicate | 0009689 | closed | giallu | Missing needed fields clear forces error and when back on mask, every fields are cleared |
has duplicate | 0009729 | closed | jreese | Report Issue: Back results in empty form when a required field was missing |
has duplicate | 0008161 | closed | jreese | While reporting issue, if you forget a field, all fields are emptied |
related to | 0009576 | closed | jreese | Problem in downloading file |
related to | 0009813 | acknowledged | Redesign forms in Mantis to not need the Back Button for mistakes. | |
related to | 0012492 | closed | atrol | Complete input get lost when timeout or not filling all required fields (when using ssl/https) |
related to | 0016570 | closed | grangeway | Page content in 'Report Issue' is forgotten when user clicks [Back] button in browser |
Sorry, this patch introduces other problems, e.g., project switching does not work any longer. :-( |
|
I tested with firefox 2.0.14 and 3.0. |
|
Perhaps the problem is not only a "minor" problem, because the handling of errors (e.g. Required field "XXX" is missing. Please use the "Back" button in your web browser to return to the previous page.) depends on it. |
|
Regarding "BTW: I noticed that sessions_api.php has no "?>" at the end of the file. I am not a php programmer and I am unsure if this is right, as some *_api.php have it, other haven't.": PHP adds "?>" at the end of the file if it's not there. Some programmers even advocate omitting "?>" at the end of files, since it guarantees that you can't have stray whitespace after the "?>" which could otherwise cause problems. |
|
Any update on this? |
|
It's being investigated, and will make it's way in as soon as the problem/fix is verified and tested. |
|
Is there any news yet about this issue? Seems a very significant one (since usability has degraded a lot.... :(). |
|
50 US if this issue is fixed before the end of August. |
|
Issue resolved in SVN: 1.1.x in r5457 and r5460; trunk in r5458, r5459, and r5461. This fixes the sessions issue, resolves problems with Firefox 3 caching disabled button states, and resolves the issues when trying to switch projects from a cached page. |
|
Thanks, jreese. Is there a ETA for 1.1.3 to be released? |
|
Did you test it with IE6? |
|
polzin: no ETA that I know of, but I'd like to see it hit soon... GESHH: I only have access to Linux machines, so I've tested on Opera and Firefox 3. I'll get IEs4Linux set back up on my workstation and see what I can figure out... |
|
GESHH: I've set up IE6 through Wine on Linux, but I cannot reproduce your problem. I can change the project from the report page just fine, and caching works. Can you try with the latest rode from SVN, clearing your history/cache in IE, and see if you still have troubles? |
|
I tested with the two patches and the current PATCHES_1_1 SVN (rv5503), with win firefox 3.0 and with linux firefox 1.5. View Issues -> Use drop down menu to change the project -> Releasing the drop down menu triggers the reload -> Project has not changed. The very first time at a page, it appeared the I could change the project once. But any further change did not work. |
|
Someone working on it?! |
|
Just another confirmation of seeing the original "loss of all data when going back to Report a Problem screen" issue on 1.1.2 (after upgrading from 1.1.1). FF3 on WinXPSP2 |
|
DJCARR I fixed this data caching problem, with this 2 fixes: I didn't apply this one because our users use only ie6 (I know ... it's bad! ;-): http://mantisbt.svn.sourceforge.net/viewvc/mantisbt?view=rev&revision=5459 I hope this help! |
|
Another confirmation from me. I also have totall loss of data when going back to Report a Problem screen" issue on 1.1.2 @ghohm: I was unable to fix this bug with the patches your mentioned. I wrote a different patch: This patch adds Javascript notifications when required fields are missing. This way, you do not have to trust the browser back history. |
|
Freaky! Just in case ... My Mantis configuration:
Our users use Internet Explorer 6.0.2900.2180 and I use Firefox 3.0.1 in testing. |
|
@hans: The javascript patch is a good idea! Why enter a new page to ask the user to go back? :-) Unfortunately, it does not work for
This would need an AJAX-like query, if the form was okay. Cool, but I guess to difficult. |
|
Can anyone tell me which program I have to use to install or use the patch file? |
|
@polzin: True, it doesn't work for other forms and custom validations. It even doesn't work for the advanced issue rapport page, and for custom fields. I have made another patch for the advanced issue rapport page. It suits for my situation. Everyone can use my submitted patch to make it work for their situation. Perhaps I could make another patch wich will work for simple and advanced rapport page. To support custom fields shoudln't be too big a problem. I can check in $t_related_custom_field_ids for $t_def['require_report'], and place a valid check according to the fieldtype. I have to look into other forms and custom calidations to know if ajax is required or not. Perhaps when I have spare time at home ;-) |
|
@jreese: Please raise priority of this issue, as it is still not solved. The suggested patches and the 1_1_0 BRANCH -r 5584 in SVN have all the same bug: Selecting a different project does not work. (See my note 0009323:0019089). I would even be happy with a workaround that removes the session handling completely. |
|
This has been completely fixed in 1.1.x and 1.2.x, with appropriate caching now implemented for all major browsers. Appropriate SVN commits: r5584 and r5587 for 1.1.x, and r5585 and r5586 for trunk 1.2.x. This is tested against IE6, IE7, IE8, Firefox 3.0, and Opera 9.5. Please check out the latest from BRANCH_1_1_0 or trunk to get the fixes. @polzin, removal of sessions is not an option, as they are required to secure against Cross-Site Request Forgery attacks. |
|
I checked with 1.1 -r 5587 and selecting a project still does not work. (firefox 3.0.1 Windows) (It works with IE6). |
|
I don't see this issue when using FF 3.0.1 on Linux. I can go to the Report Issue page, and try changing projects, and it works perfectly fine. Have you tried clearing your history and cache, and then trying again? |
|
In 1.1.x, there is only core.php to change? |
|
@ghohm, assuming you've already applied the previous patches mentioned earlier in the bug report, yes, you should only need to apply the latest fixes to core.php. |
|
So you only need session_api.php & core.php from cvs? |
|
@monotek, from SVN BRANCH_1_1_0, yes. CVS is long out of date. |
|
thats what i meant ;-) thanks. |
|
Re-closing. |
|
I am very sorry: The note:19089 problem was due to a local config_inc g_bypass_headers=ON. Thus, everything is fixed with -r 5584. (With -r 5666 I get a "Invalid form security token. Did you submit the form twice by accident?" but this is probably a different issue that will be solved until 1.1.3 will be released.) |
|
MantisBT: master-1.1.x fab2a761 2008-07-30 07:59 Details Diff |
Fix 0009323: PHP sessions prevented browser caching. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@5457 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0009323 |
|
mod - core/session_api.php | Diff File | ||
MantisBT: master 70cac855 2008-07-30 08:00 Details Diff |
Fix 0009323: PHP sessions prevented browser caching. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5458 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0009323 |
|
mod - core/session_api.php | Diff File | ||
MantisBT: master-1.1.x 50b84696 2008-09-23 19:14 Details Diff |
Fix bug 0009323: form contents not cached in Internet Explorer git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@5584 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0009323 |
|
mod - core.php | Diff File | ||
MantisBT: master 1b9050b2 2008-09-23 19:17 Details Diff |
Fix bug 0009323: form contents not cached in Internet Explorer git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5585 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0009323 |
|
mod - core.php | Diff File | ||
MantisBT: master c6821f71 2008-11-13 13:39 Details Diff |
Fix 0009754 by reverting part of issue 0009323: IE6/7 cache too much cousing 2800 errors. |
Affected Issues 0009323, 0009754 |
|
mod - core.php | Diff File | ||
MantisBT: master-1.1.x 4ee424e1 2008-11-13 13:39 Details Diff |
Fix 0009754 by reverting part of issue 0009323: IE6/7 cache too much cousing 2800 errors. |
Affected Issues 0009323, 0009754 |
|
mod - core.php | Diff File | ||
MantisBT: master 14d3d357 2008-11-24 09:11 Details Diff |
Revert <a class="text" href="/?p=mantisbt.git;a=object;h=c6821f71">c6821f71</a>, fix 0009754, 0009869, 0009323 by adding Last-Modified headers to match Expires. Commit has been tested on: FF 2.0.14 FF 3.0.4 IE 8.0.6001.18241 IE 6.0.2900.5122 GC 0.4.154.23 Opera 9.51.10081 |
Affected Issues 0009323, 0009754, 0009869 |
|
mod - core.php | Diff File | ||
MantisBT: master-1.1.x 161a677e 2008-11-24 09:11 Details Diff |
Revert <a class="text" href="/?p=mantisbt.git;a=object;h=4ee424e1">4ee424e1</a>, fix 0009754, 0009869, 0009323 by adding Last-Modified headers to match Expires. Commit has been tested on: FF 2.0.14 FF 3.0.4 IE 8.0.6001.18241 IE 6.0.2900.5122 GC 0.4.154.23 Opera 9.51.10081 |
Affected Issues 0009323, 0009754, 0009869, 0009892 |
|
mod - core.php | Diff File |