Submitted by : FrankLaurijssens at: 2007-10-04T08:58:15-07:00 (10 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

For some reason, the ZwikiPrinting DTML method doesn't work anymore and it looks like it's related to the 304 handling code (#1077).

The printing code needs to render the page as page(bare=1) but then Zwiki chokes on the bare=1 part:

  Site Error
  An error was encountered while publishing this resource. 

  AttributeError

  Sorry, a site error occurred.

  Traceback (innermost last): 

  Module ZPublisher.Publish, line 188, in   publish_module_standard 
  Module Products.PlacelessTranslationService.PatchStringIO, line 34, in new_publish 
  Module ZPublisher.Publish, line 145, in publish 
  Module Zope2.App.startup, line 216, in zpublisher_exception_hook 
  Module ZPublisher.Publish, line 114, in publish 
  Module ZPublisher.mapply, line 88, in mapply 
  Module ZPublisher.Publish, line 40, in call_object 
  Module OFS.DTMLMethod, line 144, in __call__
    <DTMLMethod at /ZWiki/print used for /ZWiki/FrontPage>
    URL: http://zwiki.ictio.nl/print/manage_main
    Physical Path:/ZWiki/print 
  Module DocumentTemplate.DT_String, line 476, in __call__ 
  Module DocumentTemplate.DT_Let, line 76, in render 
  Module DocumentTemplate.DT_In, line 703, in renderwob 
  Module DocumentTemplate.DT_Let, line 76, in render 
  Module DocumentTemplate.DT_Util, line 196, in eval 
    __traceback_info__: page 
  Module <string>, line 1, in <expression> 
  Module Products.ZWiki.ZWikiPage, line 255, in __call__ 
  Module Products.ZWiki.ZWikiPage, line 446, in handle_modified_headers 

  AttributeError 


comments:

No big deal --EmmaLaurijssens, Thu, 04 Oct 2007 09:02:03 -0700 reply
Severity: normal => minor

I just stumbled upon it doing some other research. Appending bare=1 to the URL works as expected.

It needs the REQUEST object passed --BrianKennison, Wed, 10 Dec 2008 12:26:44 -0800 reply
change page(bare=1) to page(bare=1, REQUEST=REQUEST)

... --simon, Thu, 11 Dec 2008 14:41:10 -0800 reply
Status: open => closed