zope.formlib overrides Five browser pages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Low
|
Unassigned |
Bug Description
== Steps to reproduce ==
* virtualenv --no-site-packages /tmp/bung_evn
* source /tmp/bug_
* cd /tmp/bug_env/
* easy_install Zope2==2.12.7
* ./bin/mkzopeins
* cp BugProduct.tar.gz /tmp/bug_
* extract the BugProduct.tar.gz
* /tmp/bug_
* Add a the bug product (its metat_ype is 'bug_type')
* Acess the following page and you will get a KeyError for the key 'here'
http://
It seems like the key 'here' is not added to the context, but the class
ViewPageTemplat
Products/
'here' key. But if you look at the traceback this class is not used.
For debugging I patched zope.configurat
def processxmlfile(
"""Process a configuration file
See examples in tests/text_
"""
+ print file
src = InputSource(
src.
Here is a reduces output ( each line means a loaded file by zope.configuration)
'/tmp/bug_
'/tmp/bug_
.....
'/tmp/bug_
...
'/tmp/bug_
'/tmp/bug_
'/tmp/bug_
'/tmp/bug_
'/tmp/bug_
As you see the Five.browser.
BUT while loading the zope.formlib the zope.browserpag
I'm not a zope.configuration expert, but it seems for me that the Five handlers are overridden by the zope.browserpage ones.
I know, for my particular KeyError I can replace the 'here' with 'context' inside the page template.
However I would like to share my findings, because it seems like a bigger problem.
Please follow the instructions to install Zope2 via virtualenv at http:// docs.zope. org/zope2/ releases/ 2.12/INSTALL. html. Especially the bit where you absolutely need to use an index.
You are running a combination of unsupported libraries. Zope 2.12.7 does not include nor work with zope.browserpage. zope.app.form 4.x is not supported by any Zope 2 release.