While Zope 2.13 have native wsgi support, I haven't been able to find any documentation/deployment tutorial/article/blog yet.
Would anyone point/post a working example ?
The reason is that while Zope 2's WSGI support is a starting point, there are still lots of rough edges, and as a result, WSGI is not yet an officially supported or "recommended best practice" deployment option. However, you might find http://smith-li.com/wordpress/2011/05/31/plone-4-1-with-apache-and-mod_wsgi-sorta/ useful as a starting point.
Try the following:
http://pythonpackages-docs.readthedocs.org/en/latest/ex5.html#wsgi-powered-plone-setup
The buildout referenced in that document (http://build.pythonpackages.com/buildout/plone/4.2.x) is as follows:
[buildout]
allow-hosts =
*.plone.org
*.python.org
extensions =
buildout.bootstrap
mr.developer
extends = http://dist.plone.org/release/4.2b1/versions.cfg
extends-cache = .
find-links = http://dist.plone.org/thirdparty/elementtree-1.2.7-20070827-preview.zip
parts =
mod-wsgi
plone
wsgi-conf
versions = versions
[plone]
recipe = plone.recipe.zope2instance
eggs =
PasteScript
Pillow
Plone
Products.PloneHotfix20110928
WebError
repoze.retry
repoze.tm2
repoze.vhm
products =
user = admin:admin
scripts = paster
[versions]
distribute = 0.6.24
# Error: Setup script exited with error: src/config.h: No such file or directory
# Error: Couldn't install: pycrypto 2.4
pycrypto = 2.3
zc.buildout = 1.5.2
[mod-wsgi]
recipe = collective.recipe.modwsgi
eggs = ${plone:eggs}
config-file = plone.ini
[wsgi-conf]
recipe = collective.recipe.template
url = http://build.pythonpackages.com/buildout/plone/plone.ini.in
output = plone.ini
[versions]
Zope2 = 2.13.11
Please note that a newer Zope2 is used than the one that is likely to be shipped with Plone 4.2. This is due to the fact that the 2.13.11 release adds support for doing WSGI without requiring repoze.who for authentication (which effectively increases the "convenience factor" quite a bit.)
Related
After migrating from Plone 3.3.2 to 4.3.6, the result when accessing a forum item is simply:
<Products.Five.metaclass.ConversationView object at 0x7f24404e3a50>
There is no trace, error or log entry.
The buildout.cfg file used contains the following:
eggs =
Plone
Pillow
archetypes.kss
collective.captcha
plone.app.caching
plone.app.discussion
plone.app.registry
plone.app.kss
plone.openid
plone.registry
Products.ATReferenceBrowserWidget
Products.Clouseau
Products.CMFNotification
Products.CMFPlacefulWorkflow
Products.DocFinderTab
Products.kupu
Products.NuPlone
Products.Ploneboard
Products.PloneboardNotify
Products.PloneFormGen
Products.ResourceRegistries
Products.SimpleAttachment
zope.app.container
zope.app.cache
zope.app.component
zope.app.pagetemplate
zope.app.publisher
zope.copypastemove
zope.dublincore
zope.hookable
...
[versions]
buildout.sanitycheck = 1.0b1
Cheetah = 2.2.1
collective.recipe.backup = 2.20
Pillow = 2.6.1
plone.recipe.command = 1.1
plone.recipe.unifiedinstaller = 4.3.2
Products.DocFinderTab = 1.0.5
setuptools = 7.0
zc.buildout = 2.2.5
ZopeSkel = 2.21.2
zopeskel.dexterity = 1.5.4.1
zopeskel.diazotheme = 1.1
Products.Ploneboard = 3.4
Any ideas of what may be causing this?
Thank in advance,
#joao the type "Discussion Item" is shipped with plone by default. it's not releated to ploneboard.
according to the type definition
the conversation type should use conversation_browserview as deault view.
try to call the url http://yoursite/path/to/forum/conversation/##conversation_browserview
if this works without problems, you need to update PloneboardConversation in portal_types to use this view as default view.
If you still get the error try the latest code from master and file a ticket if it still persists.
It seems a problem in the default view of the object.
Check in ZMI -> portal_types -> your content type
I'm in trouble with the "local translation" override by buildout configuration. I would like to override some standard labels of plone using the extra conf parameter "zope_i18n_compile_mo_files" with a folder placed in the buildout's directory (plone 4.3) : "locales/it/LC_MESSAGES/plone.po"
In another Plone 4.1 installation it works well. The only difference between these installations are the plone version (4.1 vs 4.3) and the architecture (stand alone vs zeo cluster).
This is the piece of my buildout:
[instance-settings]
user = admin:admin
debug-mode = off
verbose-security = off
blob-storage = ${buildout:directory}/var/blobstorage
effective-user = ${config:system-user}
products = ${buildout:directory}/products
eggs =
${plone:eggs}
zcml =
${plone:zcml}
resources = ${buildout:directory}/resources
environment-vars =
PTS_LANGUAGES it en
LANG it_IT.utf8
TZ Europe/Rome
zope_i18n_allowed_languages it en
zope_i18n_compile_mo_files true
What's the problem?
You need to register that locales directory. I do not see that in your buildout config. Something like this:
[instance]
recipe = plone.recipe.zope2instance
locales = ${buildout:directory}/locales
See https://github.com/mauritsvanrees/maurits.i18ntalk/blob/master/talk.rst#buildoutcfg
This blog gives a summary of how to use buildout when download.zope.org is down http://devblog.4teamwork.ch/blog/2013/06/06/download-dot-zope-dot-org-is-down-how-to-fix-buildout/ however it is specific to Plone 4.2.
How do I go about getting a similar cache for Plone 4.3.1 so that my buildout won't fail when download.zope.org is down?
In the case of this particular outage, you don't need a cache[1]: you need a valid extends = target. I've just fixed my Plone 4.3 buildout to avoid download.zope.org[2]. This should work for you:
[buildout]
extends = https://raw.github.com/plock/pins/master/plone-4-3
[plone]
#eggs +=
[1] Because Plone extends configuration files located on download.zope.org: http://dist.plone.org/release/4.3.1/versions.cfg
[2] As soon as a find the appropriate Zope configuration files, I'll fix 4.3.1 too.
name = MagApp 1.0
description = Magapp module that enables MagApp powered publications.
core = 7.x
php = 5.1
package = MagApp
dependencies[] = references
dependencies[] = node_reference
dependencies[] = magapp_core_content_types
version = "7.x-2.0"
I have been created a module and the info file is written above is there any problem while changing the php version , Because i did it before months , so i have to update this module , Can i add dependencies directly without using modules .
Search the source of /modules for admin/structure and check how they built that *_menu() hook.
If you have access to the server and it's running *NIX you could do:
grep -ri 'admin/structure' your_site_directory/modules/*
And then you can implement your own hook_menu() in your own module. Might also be possible in the Structure -> Menu system of the web UI. I don't recall.
We're switching from one to two Zope instances for our productoin Plone deployment. I have the following buildout structure defined:
buildout.cfg
[buildout]
extends = app.cfg
... some environment specific stuff
app.cfg
[buildout]
extends = base.cfg
parts =
zope2
productdistros
instance1
instance2
zopepy
supervisor
[instance1]
<= instance
http-address = 18081
[instance2]
<= instance
http-address = 18082
base.cg
[buildout]
parts =
zope2
productdistros
instance
zopepy
... bulk of buildout configuration suitable for both server and development
Testing this I'd expect this buildout configuration to result in the existing instance part to be deleted and replaced with instance1 and instance2. However the instance part is not deleted - it can still be found in bin and parts directory.
[zopetest#dev home]$ bin/buildout
Updating zope2.
Updating fake eggs
Updating productdistros.
Updating instance1.
Updating instance2.
Updating instance.
Updating zopepy.
Updating supervisor.
I have a very similar set-up on a different zope instance that was configured this way from the start and it has no "instance" part.
We're running zc.buildout 1.4.4 with Python 2.4.6 building Plone 3.3.6.
I've tried the following with no change:
* upgrading to buildout 1.5.2
* removing the parts assignment from base.cfg
This is a "feature" of plone.recipe.zope2instance. Traditionally the recipe has avoided removal of the instances and scripts it creates for running plone (for whatever reason: either poor design or deliberate decision, I am not sure).
For whatever it is worth, as of version 4.2.0 there is support for generating non-plone scripts (similar to zc.recipe.egg) and those scripts are managed properly. See:
https://github.com/plone/plone.recipe.zope2instance/blob/master/src/plone/recipe/zope2instance/init.py#L119
for all the gory details. (I believe the "feature" is that the install method does not return a tuple, unless you are using scripts in which case a tuple containing the scripts is returned.)
This was in fact due to the zc.buildout automatic part selection feature
When a section with a recipe is referred to, either through variable substitution or by an initializing recipe, the section is treated as a part and added to the part list before the referencing part
I had the following section
[zopepy]
# For more information on this step and configuration options see:
# http://pypi.python.org/pypi/zc.recipe.egg
recipe = zc.recipe.egg
eggs = ${instance:eggs}
As it referenced the “instance” section “instance” was included in the list of parts.
To fix I changed it to copy-paste the eggs value of instance
eggs =
Plone
${buildout:eggs}
and then ran bin/buildout