我正在使用Plone 4.0.1,并且在搜索portlet中遇到问题。正常的搜索和实时搜索做工精细,但当我尝试使用高级搜索(通过mysite的/ search_form),我收到以下错误堆栈:Plone高级搜索不起作用
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module Shared.DC.Scripts.Bindings, line 324, in __call__
Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 240, in _exec
Module Products.CMFCore.FSPageTemplate, line 180, in pt_render
Module Products.PageTemplates.PageTemplate, line 80, in pt_render
Module zope.pagetemplate.pagetemplate, line 115, 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 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 858, in do_defineMacro
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 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 858, in do_defineMacro
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 821, in do_loop_tal
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 821, in do_loop_tal
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 633, in do_insertI18nText_tal
Module Products.PageTemplates.Expressions, line 227, in evaluateText
Module zope.tales.tales, line 696, in evaluate
- URL: file:/usr/local/Plone/buildout-cache/eggs/Plone-4.0.1-py2.6.egg/Products/CMFPlone/skins/plone_forms/search_form.pt
- Line 162, Column 24
- Expression: <PythonExpr portal_types.getTypeInfo(type).Title()>
- Names:
{'container': <PloneSite at /PROJECT>,
'context': <PloneSite at /PROJECT>,
'default': <object object at 0x7fe10cfc7ae0>,
'here': <PloneSite at /PROJECT>,
'loop': {u'sublist': <Products.PageTemplates.Expressions.PathIterator object at 0xc0c58d0>,
u'type': <Products.PageTemplates.Expressions.PathIterator object at 0xc0c5a50>},
'nothing': None,
'options': {'args':()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xc0fad08>,
'request': <HTTPRequest, URL=http://www.PROJECT/search_form>,
'root': <Application at >,
'template': <FSPageTemplate at /PROJECT/search_form>,
'traverse_subpath': [],
'user': <PloneUser '[email protected]'>}
Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
- __traceback_info__: portal_types.getTypeInfo(type).Title()
Module PythonExpr, line 1, in <expression>
Module AccessControl.ImplPython, line 688, in guarded_getattr
AttributeError: 'NoneType' object has no attribute 'Title'
感谢您的帮助!
我确实有一些类型的没有标题,所以我手动设置,但它仍然无法正常工作。许多书名都有空格,你确定这可能是问题吗?我可以重新命名标题吗? –
@Brandon:标题应该有空格。这是您需要担心的类型的“id”。如果你检查类型的URL,他们中的任何一个在链接中是否有'%20'或明显的空格? –
非常感谢您的帮助,身份证是问题,高级搜索现在可以正常工作。 –