zope.app.wsgi doesn't register product configurations properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Zope 3 |
Fix Released
|
Undecided
|
Uli Fouquet | |
| grok |
Medium
|
Reinout van Rees |
Bug Description
'product-config' directive in zope.conf is not working when using wsgi to start up zope3.
The config function in zope.app.wsgi is not calling setProductConfi
from zope.app.
...
def config(...)
...
if options.
...
Reinout van Rees (reinout) wrote : | #2 |
There ought to be a (by default empty) "extra" option in the [zope_conf] template part in the buildout that you can use to add custom stuff to the end of the generated zope.conf. This immediately solves the product config problem:
[zope_conf]
recipe = ...template
...
extra =
<productconf mythingy>
blabla blub
</productconf>
Would that be a decent solution?
Reinout van Rees (reinout) wrote : | #3 |
My previous comment was targeted at grok: the current grokproject layout uses a template recipe to generate the zope.conf.
Changed in grok: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Reinout van Rees (reinout) wrote : | #4 |
I'm OK with doing the template change in grokproject. I'm not touching the other zope config recipe.
Changed in grok: | |
assignee: | nobody → Reinout van Rees (reinout) |
milestone: | none → 1.0 |
Uli Fouquet (uli-gnufix) wrote : | #5 |
Sounds good. Could you make the changes to grokproject?
Is it enough to change zope.conf or are additional steps required in zope.app.wsgi or grokcore.startup?
Reinout van Rees (reinout) wrote : | #6 |
I've added the 'extra' option to the [zope_conf] part in grokproject trunk, so this awaits a release of grokproject.
Changed in grok: | |
status: | Confirmed → Fix Committed |
Florent (florent.x) wrote : | #7 |
AFAICT it does not solve the problem reported in the title and description above.
Actually the issue is that the section <product-config myproduct> is not parsed when using Paste.
The issue is related with zope.app.wsgi because after some investigation it appears that everything is correctly registered when using zope.app.server (or even zope.app.twisted)
Then if we compare "zope/app/
...
if options.
...
Or I missed something?
Reinout van Rees (reinout) wrote : | #8 |
flox: I'll have to investigate that on monday. I thought it was only a config file problem, but I haven't actually tested it. I just removed the "it is fixed and committed" marker... Thanks for being vigilant about this!
Changed in grok: | |
status: | Fix Committed → In Progress |
Uli Fouquet (uli-gnufix) wrote : | #9 |
I'm afraid, flox is right here.
Just checked and the product_config settings are in fact not read on startup.
We need an update of zope.app.wsgi (or grokcore.startup), I'm afraid.
Maybe there is a reason, why product configuration setup wasn't included in zope.app.wsgi. I might ask that on zope-dev.
Uli Fouquet (uli-gnufix) wrote : | #10 |
Just added the required steps to zope.app.wsgi trunk and 3.4 maintenance branch.
If there are no objections from zope-dev, we could do at least a 3.4.2 release of zope.app.wsgi and update grok afterwards.
I think this could be useful also if other procedures exist for configuring apps.
Changed in grok: | |
status: | In Progress → Fix Committed |
Changed in zope3: | |
assignee: | nobody → Uli Fouquet (uli-gnufix) |
status: | Confirmed → Fix Committed |
Changed in grok: | |
status: | Fix Committed → Fix Released |
Tres Seaver (tseaver) wrote : | #11 |
zope.app.wisgi 3.6.1 includes this fix:
Changed in zope3: | |
status: | Fix Committed → Fix Released |
same issue using grok 1.0a4 (zope.app.wsgi 3.4.1)