Philipp von Weitershausen schrieb:
You are right. I forgot to mention it because the mail was originally
for the Five mailing list, which does not exist anymore, though.
Sebastian Wehrmann wrote:
while using the AbsoluteURL Adapter in a view,
By the way, you're using Five's AbsoluteURL adapter. (It's different
from the one in Zope 3). Also, the patch below seems to be for Five.
Would be good to mention that :).
While trying to write a test it turned out, that it's not a problem in
Five but in the interaction between Plone3 and Zope2/Five.
Can you round up a test that demonstrates how the current
implementation fails to cover your case and how your suggestion change
The problem we tried to solve was: We have a structure of Plone content
objects. We wanted to access a particular one in a view which can be
called anywhere. Therefore we registered this content object as an
utility. It turned out, that this utility does not have a request after
fetching it in our view with getUtility(). The request is needed to get
an absolute URL of our content object.
We solved the problem temporarily with an adapter which overrides Five's
AbsoluteURL adapter which contains the code from the patch.
Anybody an idea how to do this in a better way?
gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale · germany
www.gocept.com · work. +49 345 122988912 · fax. +49 345 12298891
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -