[Zope-dev] read-only ZPublisher.Publish

Jeremy Tammik jeremy at redcor.ch
Tue Feb 24 12:50:15 EST 2004


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






More information about the Zope-Dev mailing list