从2.5迁移到3.3.5。我继承了一个plone系统,我们必须迁移到3.3.5以保持站点的认证。我知道zilch关于plone,主要来自windows管理,sharepoint和.net编程背景。
我觉得我很接近这个工作。
当我导航到某个页面时,该页面会显示错误代码而不是内容(改进而不是显示回溯而不是页面)。现在错误是这样的:
Exception traceback
Time 2012/09/19 11:24:04.160 GMT-7
User Name (User Id) Anonymous User (None)
Request URL http://localhost:8080/mission-vision/index_html/document_view
Exception Type KeyError
Exception Value 'view'
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec
Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render
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 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 957, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 861, in do_defineMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 949, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 861, in do_defineMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 534, in do_optTag_tal
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 745, in do_insertStructure_tal
Module Products.PageTemplates.Expressions, line 223, in evaluateStructure
Module zope.tales.tales, line 696, in evaluate
URL: file:d:\websites\nipo\plone 3.3.5\buildout-cache\eggs\plone-3.3.5-py2.4.egg\Products\CMFPlone\skins\plone_deprecated\document_actions.pt
Line 27, Column 4
Expression: <StringExpr u'plone.documentactions'>
Names:
{'container': <PloneSite at /Plone>,
'context': <ATDocument at /Plone/mission-vision/index_html>,
'default': <object object at 0x010BD528>,
'here': <ATDocument at /Plone/mission-vision/index_html>,
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x04A37B98>,
'request': <HTTPRequest, URL=http://localhost:8080/mission-vision/index_html/document_view>,
'root': <Application at >,
'template': <ZopePageTemplate at /Plone/document_view used for /Plone/mission-vision/index_html>,
'traverse_subpath': [],
'user': <SpecialUser 'Anonymous User'>}
Module Products.Five.browser.providerexpression, line 17, in __call__
KeyError: 'view'
看起来问题出在document_view模板中。这很奇怪,因为它根本没有被修改过,它是开箱即用的:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="here/main_template/macros/master"
i18n:domain="plone">
<body>
<metal:main fill-slot="main">
<tal:main-macro metal:define-macro="main"
tal:define="kssClassesView context/@@kss_field_decorator_view;
getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;
templateId template/getId;
text here/getText;">
<div tal:replace="structure provider:plone.abovecontenttitle" />
<h1 class="documentFirstHeading">
<metal:field use-macro="python:here.widget('title', mode='view')">
Title
</metal:field>
</h1>
<div tal:replace="structure provider:plone.belowcontenttitle" />
<p class="documentDescription">
<metal:field use-macro="python:here.widget('description', mode='view')">
Description
</metal:field>
</p>
<div tal:replace="structure provider:plone.abovecontentbody" />
<p tal:condition="python: not text and is_editable"
i18n:translate="no_body_text"
class="discreet">
This item does not have any body text, click the edit tab to change it.
</p>
<metal:field use-macro="python:here.widget('text', mode='view')">
Body text
</metal:field>
<div metal:use-macro="here/document_relateditems/macros/relatedItems">
show related items if they exist
</div>
<div tal:replace="structure provider:plone.belowcontentbody" />
</tal:main-macro>
</metal:main>
</body>
</html>
有人知道为什么会这样吗?