silva trunk reference lookup window broken?

Andy Altepeter <[email protected]> Thu, 3 Jan 2008 21:38:15 -0600
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
Hey!

Can anyone else developing in the Silva trunk replicate this problem?  I don't 
know if it's just my local install or not...

In the Silva trunk, when editing a document in kupu, and in the link tool I 
click "get link reference", I get the following error:

AttributeError: objectLookupGetObjects

And the relevant part of the traceback is is below.

It seems that with "view.objectLookupGetObjects", we're expecting the Zope 3 
browserview helper class (Silva/browser/lookup.py), but what we really get is 
the Silva "view" attribute, which references the current SilvaView view.  In 
other words, the view variable is what you would expect in a Silva view (e.g. 
edit), and not a Zope 3 browser view.

If I change the relevant line of object_lookup.pt to:
options['args'][0].objectLookupGetObjects, it works just fine.

Cheers,
Andy

#  Module zope.tales.tales, line 696, in evaluate
URL: index
Line 77, Column 14
Expression: <PythonExpr (view.objectLookupGetObjects(filter, int(show_add)))>
Names:

{'container': <Silva Root instance silva>,
 'context': <Silva Root instance silva>,
 'default': <object object at 0xb7c56528>,
 'here': <Silva Root instance silva>,
 'loop': {},
 'nothing': None,
 'options': {'args': (<Products.Five.metaclass.SimpleViewClass 
from /home/aaltepet/infrae/Zope-1/Products/Silva/browser/object_lookup.pt 
object at 0x868e44c>,)},
 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 
0x9db416c>,
 'request': <HTTPRequest, URL=http://localhost:8080/silva/@@object_lookup>,
 'root': <Application at >,
 'template': <ImplicitAcquirerWrapper object at 0x9bdd14c>,
 'traverse_subpath': [],
 'user': <User 'aaltepet'>,
 'view': <Products.Five.metaclass.SimpleViewClass 
from /home/aaltepet/infrae/Zope-1/Products/Silva/browser/object_lookup.pt 
object at 0x868e44c>,
 'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at 
0xa0cabcc>}

# Module zope.tales.pythonexpr, line 59, in __call__
__traceback_info__: (view.objectLookupGetObjects(filter, int(show_add)))
# Module <string>, line 0, in ?