[ZPT] Batching Oddity

ksmith@99hats.com ksmith@99hats.com
Wed, 5 Sep 2001 18:15:17 -0400


This is a multi-part message in MIME format.
----------999728117
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I have ZPT 1.4.0 on Zope 2.3.2 

I'm using classes to create a UBB clone.

I never had any problems displaying forums and topics until I added batching to the forum_template. Whenever I use batching as described in the DTMLtoZPT conversion wiki page, I run to intermittent DNS errors on IE or Unexpected Network Read Error on Lynx. When jumping around to other ZPT pages.  

It can take four or five attempts to load a ZPT page. Once loaded, the page is easy to access after that. 


In the Z2.log, no activity shows until I can finally load the page. However, when it does load the page I get a 304.

Does anyone have any ideas where I should be looking for trouble?


ZBoard (Folderish Zclass)
  - index_html --> dtml-var board_template (ZPT)
ZForum (Folderish Zclass)
  - index_html --> dtml-var forum_template (ZPT)
ZTopic (Folderish Zclass)
  - index_html --> dtml-var topic_template (ZPT)
ZReply (Folderish ZClass)



forum_template 

< table border="0" cellpadding="4" cellspacing="1" width="100%" tal:define="b_start python:path('request/b_start') or 0;
                 results python:here.listTopics();
                 Batch python:modules['ZTUtils'].Batch;
                 batch python:Batch(results, 10, int(b_start),orphan=6)" >


< tr bgcolor=ffffff><td colspan=7 >
    < a href="nextbatch" 
       tal:define="p batch/previous"
       tal:condition="p"
       tal:attributes="href string:?b_start=${p/first}">
       &lt;&lt; Previous < span tal:replace="p/length" >n</ span >
    </a>
&nbsp;&nbsp;&nbsp;
< a href="nextbatch" tal:define="n batch/next"
       tal:condition="n"
       tal:attributes="href string:?b_start=${batch/end}" >
       Next < span tal:replace="n/length" >n< /span > &gt;&gt;
    < /a >

< /td >< /tr >



----------999728117--