[Zope-CMF] Re: portal discussion and folder like object
Joseph Kocherhans
jkocherhans at mac.com
Thu Apr 15 19:09:09 EDT 2004
Joseph Kocherhans wrote:
> Dieter Maurer wrote:
>> Sylvain Thénault wrote at 2003-1-27 15:18 +0100:
>> > I've a problemn trying to allow discussion on folder like objects. The
>> > problem is that discussion items may not be attached to the correct
>> > folder since the folder may acquire its 'talkback' attribute.
>> > I've filled a bug to the collector (http://collector.zope.org/CMF/119)
>> > and tried to wrote a patch but my patch seems to break the discussion
>> > mecanism in another point when it tries to reconstruct thread.
>> > > Any idea on this ?
>> You "hasattr(aq_base(folder),'talkback')" to check
>> whether "folder" as a "talkback" and if it has, use
>> "folder.talkback" to access it.
>
>
> Did anyone ever try this out? I'm running into the same problem. The
> collector issue is still open and I don't see anything in the cvs logs,
> so I assume it was never resolved. I'll try incorporating Dieter's fix
> sometime soon, and if it works I'll add the patch(es) to the collector.
> Of course if someone else has already tried this it'd be nice to save
> some time ;)
I incorporated Deiter's suggestion. It works unless you reply to a
discussion item. I found the discussion threads error that others have
been getting... still trying to track down the root of it. I think it
has something to do with CMFDefault.DiscussionItem._getDiscussable().
Here's the traceback for the archives:
2004-04-15T16:40:57 ERROR(200) SiteError
http://127.0.0.1:8080/testing/nviss/YthAcc/talkback/1082068398
Traceback (most recent call last):
File "C:\Program Files\Zope-2.7.0\lib\python\ZPublisher\Publish.py",
line 100, in publish
request, bind=1)
File "C:\Program Files\Zope-2.7.0\lib\python\ZPublisher\mapply.py",
line 88, in mapply
if debug is not None: return debug(object,args,context)
File "C:\Program Files\Zope-2.7.0\lib\python\ZPublisher\Publish.py",
line 40, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "C:\zope\instance1\Products\CMFCore\PortalContent.py", line 116,
in __call__
return view()
File "C:\Program
Files\Zope-2.7.0\lib\python\Shared\DC\Scripts\Bindings.py", line 306, in
__call__
return self._bindAndExec(args, kw, None)
File "C:\Program
Files\Zope-2.7.0\lib\python\Shared\DC\Scripts\Bindings.py", line 343, in
_bindAndExec
return self._exec(bound_data, args, kw)
File "C:\zope\instance1\Products\CMFCore\FSPageTemplate.py", line
191, in _exec
result = self.pt_render(extra_context=bound_names)
File "C:\zope\instance1\Products\CMFCore\FSPageTemplate.py", line
124, in pt_render
result = FSPageTemplate.inheritedAttribute('pt_render')(
File "C:\Program
Files\Zope-2.7.0\lib\python\Products\PageTemplates\PageTemplate.py",
line 96, in pt_render
tal=not source, strictinsert=0)()
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 189, in __call__
self.interpret(self.program)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 218, in interpret
def interpret(self, program):
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 663, in do_useMacro
self.interpret(macro)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 408, in do_optTag_tal
self.do_optTag(stuff)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 393, in do_optTag
return self.no_tag(start, program)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 388, in no_tag
self.interpret(program)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 686, in do_defineSlot
self.interpret(slot)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 408, in do_optTag_tal
self.do_optTag(stuff)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 393, in do_optTag
return self.no_tag(start, program)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 388, in no_tag
self.interpret(program)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 629, in do_condition
self.interpret(block)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File "C:\Program Files\Zope-2.7.0\lib\python\TAL\TALInterpreter.py",
line 561, in do_insertStructure_tal
structure = self.engine.evaluateStructure(expr)
File "C:\Program
Files\Zope-2.7.0\lib\python\Products\PageTemplates\TALES.py", line 220,
in evaluate
return expression(self)
File "C:\Program
Files\Zope-2.7.0\lib\python\Products\PageTemplates\Expressions.py", line
198, in __call__
def __call__(self, econtext):
File "C:\Program
Files\Zope-2.7.0\lib\python\Products\PageTemplates\Expressions.py", line
201, in __call__
return self._eval(econtext)
File "C:\Program
Files\Zope-2.7.0\lib\python\Products\PageTemplates\Expressions.py", line
196, in _eval
return render(ob, econtext.vars)
File "C:\Program
Files\Zope-2.7.0\lib\python\Products\PageTemplates\Expressions.py", line
95, in render
ob = call_with_ns(ob.__render_with_namespace__, ns)
File "C:\Program
Files\Zope-2.7.0\lib\python\Products\PageTemplates\ZRPythonExpr.py",
line 73, in call_with_ns
return f(td)
File "C:\zope\instance1\Products\CMFCore\FSPythonScript.py", line 99,
in __render_with_namespace__
return Script.__render_with_namespace__(self, namespace)
File "C:\Program
Files\Zope-2.7.0\lib\python\Shared\DC\Scripts\Bindings.py", line 320, in
__render_with_namespace__
return self._bindAndExec((), namevals, namespace)
File "C:\Program
Files\Zope-2.7.0\lib\python\Shared\DC\Scripts\Bindings.py", line 343, in
_bindAndExec
return self._exec(bound_data, args, kw)
File "C:\zope\instance1\Products\CMFCore\FSPythonScript.py", line
160, in _exec
result = apply(f, args, kw)
File "Script (Python)", line 3, in aboveInThread
File "C:\zope\instance1\Products\CMFDefault\DiscussionItem.py", line
169, in parentsInThread
assert not parent in parents # sanity check
AssertionError
More information about the Zope-CMF
mailing list