-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zope.browserpage.metaconfigure.simple breaks subpaths #6
Comments
|
#7 is released in version 4.4.0 on PyPI. |
@icemac looks good! thanks for letting me know! |
It seems I was a bit hasty in testing this. I did install it in the right virtualenv and followed our manual testcase and it worked, yet it did not verify the updated package was actually being used. so it does not work yet. maybe this can be fixed in our code, I'm not sure and have to do more research, since this part of our application is rather old and the original dev is not with us anymore. I'm going to go into more detail on our subpathview, if that helps. @implementer(IPublishTraverse)
class BaseSubPathView(object):
def __init__(self, *args, **kw):
self.subpaths = {}
self._called_sub_path = None
# find subpaths and bild up lookup
for m_name, m in inspect.getmembers(self, predicate=inspect.ismethod):
if hasattr(m, '_sub_path_name'):
self.subpaths[m._sub_path_name] = m
def publishTraverse(self, request, name):
''' Lookup for subpath
(zope.publisher.interfaces.IPublishTraverse)
'''
log.debug('sub traverse %s' % name)
if name in self.subpaths:
self._called_sub_path = self.subpaths[name]
return self
return request.response.notFoundError(name)
def __call__(self):
csp = self._called_sub_path
return csp() if csp else None |
Are there any news on this issue? |
from "our" side I don't know, I don't work for this company anymore, but my guess is my "patch" is still in use and it's not a priority as long as it works |
I'm currently in the process of porting a Zope2 project to Zope4, which worked surprisingly well so far. One big issue I've come across though is that our subpaths are broken, due to the
simple
-Class overriding our ownpublishTraverse
and always returning NotFound.our implementation
and in zope.browserpage.metaconfigure
This does not work anymore because simple.publishTraverse is used, not BaseSubPathView.publishTraverse ... I patched this locally to the following:
The text was updated successfully, but these errors were encountered: