[Zope] response.redirect not working

David H bluepaul at earthlink.net
Fri May 20 17:09:30 EDT 2005


Artūras wrote:

>Hello,
>
>
>I have a web page, a form on it, and on form submit action (to the same page) I do some database actions (update some record, to be correct). The exact code looks like this (filename edit_html):
>
>.........
>
>(1) <dtml-if form>
>(2)   <dtml-call "RESPONSE.redirect('index_html')">
>
>      <p style="color:green"><b>Saved.</b></p>
>
>(3)  <dtml-in "db_fulluseredit(zd=_['zd'], orig_login=_['uid'], login=_['login'], vardas=_['vardas'], pavarde=_['pavarde'], 
>    nickas=_['nickas'], email=_['email'], address=_['address'], phone=_['phone'], pastabos=_['pastabos'], 
>    date_gime=_['date_gime'], date_valid=_['date_valid'], planas=_['planas'], current_user_login=AUTHENTICATED_USER.getUserName())">
>
>.....
>
>On #1 line I check if form variable is defined (it's defined in form, so if the form is opened for the first time, the form is naturally null, and if the form is submitted - it's defined to 1 [<input type=hidden name=form value=1>] ). #2 line let's skip for a moment. On #3 line I do database actions with result checking. (On a wider scope - the form is for user properties management - name, surname, address, login, phone, notes & etc.).
>
>The problem is on line #2. According to what's written, zope should drop everything and do immediate redirect to page index_html (ok, it's not where the first error appeared, I just managed to generate this error as the most clearest and best visible one), but instead zope calmly executes database actions and does other stuff till the end of the document.
>
>
>I’d be very thankful for any ideas... it's sad not to control own code :/
>
>If you want, I can send you the whole code as well as to provide access to the live system.
>
>Zope version: 2.6.4-1.8. Debian, postgresql 7.4 (latest 7th, I don't remember exact version now).
>
> 
>Artūras
>arturas at gce.lt
>
>
>_______________________________________________
>Zope maillist  -  Zope at zope.org
>http://mail.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
>__________ NOD32 1.1103 (20050520) Information __________
>
>This message was checked by NOD32 antivirus system.
>http://www.nod32.com
>
>
>
>  
>
Arturas,
 RESPONSE.redirect drops request (including form vars).  Maybe thats a 
clue? 
David



More information about the Zope mailing list