English 中文(简体)
如何在 plone. app. discussion 注释中添加新字段?
原标题:How to add a new field to the plone.app.discussion comment in plone4

i want to add a new field email to plone.app.discussion comment for anonymous users . I have searched in google and found two approaches.

Approach1: using quintagroup product "quintagroup.plonecommments". With this approach my plone is getting crashed.

Approach2: Following the procedure given in the URL : http://packages.python.org/plone.app.discussion/howtos/howto_extend_the_comment_form.html. This approach is not working.

Can anyone help me with any solution for my requirement.

Traceback of Approach1:

Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module plone.z3cform.layout, line 71, in call
Module plone.z3cform.layout, line 91, in render
Module Products.Five.browser.pagetemplatefile, line 125, in call
Module Products.Five.browser.pagetemplatefile, line 59, in call
Module zope.pagetemplate.pagetemplate, line 113, in pt_render
Module zope.tal.talinterpreter, line 271, in call
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 405, in do_startTag
Module zope.tal.talinterpreter, line 482, in attrAction_tal
Module Products.PageTemplates.Expressions, line 225, in evaluateText
Module zope.tales.tales, line 696, in evaluate
- URL: c:plone41eggsplone.app.discussion-2.0.10-py2.6.eggploneappdiscussionrowsercontrolpanel.pt
- Line 17, Column 0
- Expression: <PathExpr standard:u view/settings >
- Names:
{ args : (),
container : <PloneSite at /test>,
context : <PloneSite at /test>,
default : <object object at 0x00991830>,
here : <PloneSite at /test>,
loop : {},
nothing : None,
options : {},
repeat : <Products.PageTemplates.Expressions.SafeMapping object at 0x06995CF0>,
request : <HTTPRequest, URL=http://localhost:8080/test/@@discussion-settings>,
root : <Application at >,
template : <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x051C5490>,
traverse_subpath : [],
user : <PropertiedUser admin >,
view : <Products.Five.metaclass.DiscussionSettingsControlPanel object at 0x06AF07B0>,
views : <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x06A28450>}
Module zope.tales.expressions, line 217, in call
Module Products.PageTemplates.Expressions, line 155, in _eval
Module Products.PageTemplates.Expressions, line 117, in render
Module plone.app.discussion.browser.controlpanel, line 128, in settings
IndexError: tuple index out of range

对于方法2, 我没有任何错误, 但网站上没有反映任何错误 。

问题回答

您提供的错误跟踪似乎是一个知道的 plone. app. discussion 错误。 请升级为 plone. app. discussion 2. 1.5 来修正它 。

Martijn已经指出,你必须提供更多的信息,提供完整的追踪信息,否则人们无法真正帮助你。仅仅提供“这个方法行不通 ”, 使人们无法提供帮助。





相关问题
VS 10 mangles html comments?

Using the latest VS 10 we created html markup, then commented it with html comments. The file on disk is not mangled, but when it renders, it renders the html comment tags, then removes some of the ...

Comments & OpenSource software [closed]

This may sound like a foolish question or an observation, but i have seen that most of the times when one tries to look at the opensource code, there are no comments or just one or two lines at the ...

Including commented Class declaration in implementation file

Everyone knows the advantages of a more readable code. So in order to make my code more readable what i do normally is include the commented class declaration in the implementation file of that class....

pair programming with comments [closed]

Over the years, I ve discovered that green-programmers tend to read the comments rather than the code to debug issues. Does having one person document the other person s code (and vice-versa) with ...

Commenting JavaScript functions á la Python Docstrings

It is valid JavaScript to write something like this: function example(x) { "Here is a short doc what I do."; // code of the function } The string actually does nothing. Is there any reason, ...

热门标签