ZF-2915: Hash Element Problem with FF2 and IE7 (not tested with safari yet)

Issue Type: Bug Created: 2008-03-18T12:19:44.000+0000 Last Updated: 2011-02-17T14:56:55.000+0000 Status: Resolved Fix version(s): - 1.12.0 (27/Aug/12)

Reporter: Aldemar Bernal (aldemar.bernal) Assignee: Ralph Schindler (ralph) Tags: - Zend_Form

Related issues: - ZF-5182



While using FF2 and IE7 (not tested with safari, please check) when the user click on the back button the page is not reloaded, it is loaded from its own cache which creates the hash hidden form element with an incorrect value (an old value).


Posted by Amr Mostafa (alienbrain) on 2008-03-21T16:46:27.000+0000

It makes sense. Because the browser sends its cached POST data again to the form without requesting it (the form). This is just the same as if some random user tries to POST some data to the form without requesting it.

I totally understand the back button problem though, but I don't think it belongs to Zend_Form. You should be looking at implementing the Post/Redirect/Get pattern. I've seen previous discussions on the list regarding achieving it in lower levels so almost all the work is done.

Posted by Aldemar Bernal (aldemar.bernal) on 2008-03-22T01:05:49.000+0000

I've found that maybe this issue could be addressed by setting some headers like the expiration date at the same moment the form is created or a date before that. This will make the browser reload the page each time.

Posted by Wil Sinclair (wil) on 2008-03-25T20:29:10.000+0000

Please categorize/fix as needed.

Posted by Matthew Weier O'Phinney (matthew) on 2008-04-22T10:28:30.000+0000

Scheduling for next minor release.

Posted by Kim Blomqvist (kblomqvist) on 2009-11-18T09:45:14.000+0000

How this will be fixed? I disagree with Amr Mostafa that this wouldn't be an issue. Actually I have used hash element to prevent resubmissions caused by back button.

Posted by Kim Blomqvist (kblomqvist) on 2010-08-07T10:35:33.000+0000

I cannot reproduce this anymore in ZF 1.10.7. Don't know why...

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.