[Product-Developers] A bit of help with a Collective project...

Shane Graber sgraber at gmail.com
Fri Jan 1 22:36:15 UTC 2010


I ended up figuring out my error by looking at some additional products in
the collective. At this point the product installs/uninstalls properly and
it now ships with three configurable portlets to show various commenting
statistics.

Thank you for the help!  :)

Shane


On Fri, Jan 1, 2010 at 3:55 PM, Shane Graber <sgraber at gmail.com> wrote:

> Tim:
>
>
> > There does seem to be an outstanding bug[1] open for this issue.
> >
> > [1] http://dev.plone.org/plone/ticket/7166
>
> Yep, that seemed to resolve the viewlet problems I was having. Thank you!
>  :)
>
>
>
> >> 3. The uninstall routine at /Extensions/Install.py doesn't uninstall
> >> the configlet properly/cleanly. The action @ portal_controlpanel is
> >> removed based on what I see in the ZMI and from the control panel w/in
> >> plone but you can still get to @@intensedebate-controlpanel even after
> >> uninstalling the product in the Plone control panel.
> >
> > Is this because its something registered within the global (is this the
> > right word?) component manager in zope and therefore will only disappear
> > once the package is removed from the zope instance? Just a thought.
>
> Apparently my package isn't the only one that a person can reach the
> @@intensedebate-controlpanel url from after it's uninstalled.  I just
> uninstalled Collage and even after uninstalling it I could still reach
> @@collage-controlpanel with all of its config options.  I'm considering this
> a non-issue for me now since other packages exhibit this behavior after
> uninstalling.
>
> The only problem I have left right now is figuring out how to move the
> config options into the portlet code.  I've started moving it into my
> portlet code:
>
>
> http://github.com/sgraber/collective.intensedebate/blob/master/src/collective/intensedebate/idlatestcommentsportlet.py
>
> However I keep hitting a wall when I try to use the config information in
> the idlatestcommentsportlet.py.  Could someone look at the code and see what
> I'm doing wrong?  I'm getting the following traceback when trying to render
> this portlet:
>
> 2010-01-01 15:47:31 ERROR portlets Error while rendering
> <plone.app.portlets.man
> ager.ColumnPortletManagerRenderer object at 0x0774E530>
> Traceback (most recent call last):
>   File
> "c:\projects\plone317\buildout-cache\eggs\plone.app.portlets-1.1.5.1-py2.
> 4.egg\plone\app\portlets\manager.py", line 65, in safe_render
>     return portlet_renderer.render()
>   File
> "C:\projects\Plone317/zope2\lib\python\Shared\DC\Scripts\Bindings.py", li
> ne 313, in __call__
>     return self._bindAndExec(args, kw, None)
>   File
> "C:\projects\Plone317/zope2\lib\python\Shared\DC\Scripts\Bindings.py", li
> ne 350, in _bindAndExec
>     return self._exec(bound_data, args, kw)
>   File
> "C:\projects\Plone317\zope2\lib\python\Products\PageTemplates\PageTemplat
> eFile.py", line 129, in _exec
>     return self.pt_render(extra_context=bound_names)
>   File
> "C:\projects\Plone317\zope2\lib\python\Products\PageTemplates\PageTemplat
> e.py", line 98, in pt_render
>     showtal=showtal)
>   File
> "C:\projects\Plone317\zope2\lib\python\zope\pagetemplate\pagetemplate.py"
> , line 117, in pt_render
>     strictinsert=0, sourceAnnotations=sourceAnnotations)()
>   File "C:\projects\Plone317\zope2\lib\python\zope\tal\talinterpreter.py",
> line
> 271, in __call__
>     self.interpret(self.program)
>   File "C:\projects\Plone317\zope2\lib\python\zope\tal\talinterpreter.py",
> line
> 346, in interpret
>     handlers[opcode](self, args)
>   File "C:\projects\Plone317\zope2\lib\python\zope\tal\talinterpreter.py",
> line
> 586, in do_setLocal_tal
>     self.engine.setLocal(name, self.engine.evaluateValue(expr))
>   File "C:\projects\Plone317\zope2\lib\python\zope\tales\tales.py", line
> 696, in
>  evaluate
>     return expression(self)
>   File "C:\projects\Plone317\zope2\lib\python\zope\tales\expressions.py",
> line 2
> 17, in __call__
>     return self._eval(econtext)
>   File
> "C:\projects\Plone317\zope2\lib\python\Products\PageTemplates\Expressions
> .py", line 161, in _eval
>     return render(ob, econtext.vars)
>   File
> "C:\projects\Plone317\zope2\lib\python\Products\PageTemplates\Expressions
> .py", line 123, in render
>     ob = ob()
>   File
> "c:\projects\plone317\src\collective.intensedebate\src\collective\intense
> debate\idlatestcommentsportlet.py", line 95, in num
>     num = self.num_to_display # for some reason this is returning an
> AssertionEr
> ror
> AttributeError: num_to_display
> 2010-01-01 15:47:31 ERROR Zope.SiteErrorLog
> http://localhost:8080/advancedaquari
> st/2008/index.html/tocview
> Traceback (innermost last):
>   Module plone.app.portlets.manager, line 65, in safe_render
>   Module Shared.DC.Scripts.Bindings, line 313, in __call__
>   Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
>   Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
>   Module Products.PageTemplates.PageTemplate, line 98, in pt_render
>   Module zope.pagetemplate.pagetemplate, line 117, in pt_render
>   Module zope.tal.talinterpreter, line 271, in __call__
>   Module zope.tal.talinterpreter, line 346, in interpret
>   Module zope.tal.talinterpreter, line 586, in do_setLocal_tal
>   Module zope.tales.tales, line 696, in evaluate
>    - URL: idlatestcommentsportlet
>    - Line 1, Column 0
>    - Expression: <PathExpr standard:'view/num'>
>    - Names:
>       {'container': <ATTopic at /advancedaquarist/2008/index.html>,
>        'context': <ATTopic at /advancedaquarist/2008/index.html>,
>        'default': <object object at 0x00A6C528>,
>        'here': <ATTopic at /advancedaquarist/2008/index.html>,
>        'loop': {},
>        'nothing': None,
>        'options': {'args': ()},
>        'repeat': <Products.PageTemplates.Expressions.SafeMapping object at
> 0x081
> EC940>,
>        'request': <HTTPRequest, URL=
> http://localhost:8080/advancedaquarist/2008/
> index.html/tocview>,
>        'root': <Application at >,
>        'template': <ImplicitAcquirerWrapper object at 0x081AAAB0>,
>        'traverse_subpath': [],
>        'user': <PropertiedUser 'admin'>,
>        'view': <collective.intensedebate.idlatestcommentsportlet.Renderer
> object
>  at 0x0773B190>,
>        'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper
> object at
>  0x08054290>}
>   Module zope.tales.expressions, line 217, in __call__
>   Module Products.PageTemplates.Expressions, line 161, in _eval
>   Module Products.PageTemplates.Expressions, line 123, in render
>   Module collective.intensedebate.idlatestcommentsportlet, line 95, in num
> AttributeError: num_to_display
>
>
> Shane
>
>


-- 
Shane  ∞  http://google.com/profiles/sgraber
---------
I'm so cool I can be used to prove Bose-Einstein Condensation!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20100101/cb85fb06/attachment.html>


More information about the Product-Developers mailing list