using WSGIPublisher
Paul J Stevens <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I've been running a test-setup using ZPublisher/WSGIPublisher.py
mongrel2 -> wsgid -> zope2
I'm running into some minor, some larger issues. Most importantly,
transactions are not committed. You know better than I do what that
means. For me, I can't create Plone sites, or even DTMLDocuments. And
when I create then using ZServer, I can't delete them any more through
the wsgi route.
I have a small patch against WSGIPublisher.py (branch 2.13) that fixes
above behaviour (attached).
After applying it creating and deleting content works ok, but when using
the sunburst theme, the created site looks completely unstyled, whereas
using the classic plone theme everything looks much better.
The plot thickens however because when I enable debug-mode, everything
works great!
Maybe someone with better understanding of the mechanics involved now
has an epiphany.
FYI, I'm using the following buildout:
https://github.com/pjstevns/plone.mongrel2
thanks.
--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin
* Premium Hosting Services and Web Application Consultancy *
www.nfg.nl/[email protected]/+31.85.877.99.97
________________________________________________________________
_______________________________________________
Zope-Dev maillist - [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )
Zope2.diff
(text/x-patch, 877 B)
Index: src/ZPublisher/WSGIPublisher.py
===================================================================
--- src/ZPublisher/WSGIPublisher.py (revision 126531)
+++ src/ZPublisher/WSGIPublisher.py (working copy)
@@ -30,7 +30,8 @@
from ZPublisher.Publish import dont_publish_class
from ZPublisher.Publish import get_module_info
from ZPublisher.Publish import missing_name
-from ZPublisher.pubevents import PubStart, PubBeforeCommit, PubAfterTraversal
+from ZPublisher.pubevents import PubStart, PubBeforeCommit, \
+ PubAfterTraversal, PubSuccess
from ZPublisher.Iterators import IStreamIterator
_NOW = None # overwrite for testing
@@ -206,6 +207,12 @@
response.setBody(result)
notify(PubBeforeCommit(request))
+
+ if transactions_manager:
+ transactions_manager.commit()
+
+ notify(PubSuccess(request))
+
return response