Re: [Zope-dev] read-only ZPublisher.Publish

2004-02-25 Thread Chris Withers
Jeremy Tammik wrote:

when i try to view a specific page, i get an error

   * Module ZPublisher.Publish, line 104, in publish
   * Module Zope.App.startup, line 221, in commit
   * Module ZODB.Transaction, line 232, in commit
   * Module ZODB.Transaction, line 340, in _commit_begin
   * Module ZODB.Connection, line 692, in tpc_begin
   * Module ZODB.BaseStorage, line 142, in tpc_begin
You forgot the exception type and value ;-)

Looks like this page is trying to commit something, if you're developign a 
read-only version, it shouldn't...

That page's code would be a good place to look...

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] read-only ZPublisher.Publish

2004-02-24 Thread Jeremy Tammik
hi guys,

i have a question about ZPublisher.Publish.

i am creating a read-only version of a Zope/Plone site for burning on a CD.

i have set the read-only attribute in the zodb_db main section in 
zope.conf, and made the entire directory system read-only.

when i try to view a specific page, i get an error

   * Module ZPublisher.Publish, line 104, in publish
   * Module Zope.App.startup, line 221, in commit
   * Module ZODB.Transaction, line 232, in commit
   * Module ZODB.Transaction, line 340, in _commit_begin
   * Module ZODB.Connection, line 692, in tpc_begin
   * Module ZODB.BaseStorage, line 142, in tpc_begin
which i was able to fix by adding the line

   transactions_manager=None # jeremy

after the line

   (bobo_before, bobo_after, object, realm, debug_mode, err_hook,
validated_hook, transactions_manager)= get_module_info(module_name)
in publish() in ZPublisher/Publish.py

is there a more elegant way of solving this?

such as telling ZPublisher that we are in read-only mode and not to 
commit anything, not to use any transactions?

or is it a sign of some error in the page templates (or somewhere) that 
the publish() is being called at all, if we are only trying to view a page?

cheers

jeremy



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )