Plone 3.3.5 Portlet_取数器问题

Plone 3.3.5 Portlet_取数器问题,plone,Plone,我一直在处理plone升级,我想我几乎完成了清理工作 最近的这个错误让我 在主模板中,我得到一个错误: Macro Expansion failed exceptions.NameError: name 'pathexpr' is not defined 我追溯到它来自portlets_fetcher模板。这一个是从盒子里出来的,但它仍然抛出错误 我不明白,我看到了: tal:define="pathexpr python:slot[0]; usemacro pytho

我一直在处理plone升级,我想我几乎完成了清理工作

最近的这个错误让我

在主模板中,我得到一个错误:

Macro Expansion failed
exceptions.NameError: name 'pathexpr' is not defined
我追溯到它来自portlets_fetcher模板。这一个是从盒子里出来的,但它仍然抛出错误

我不明白,我看到了:

tal:define="pathexpr python:slot[0];
            usemacro python:slot[1];"
有人知道我为什么会这样吗

在我的故障排除中,我尝试编辑自定义主模板时出错。我在任何地方都没有看到pathexpr,所以我使用了skins文件夹上的find选项卡,唯一的结果是portlets_fetcher。我将portlets_fetcher复制到custom,并在那里看到了相同的错误

编辑:以下是Portlet_获取程序模板:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" 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"
      i18n:domain="plone">
<body>
<metal:leftcolumn define-macro="left_column"
   tal:define="Iterator python:modules['Products.CMFPlone'].IndexIterator;
               tabindex python:Iterator(pos=10000, mainSlot=False);"0
   tal:condition="sl|nothing">
    <metal:block tal:repeat="slot sl">
        <tal:dontcrash tal:on-error="structure python:context.plone_log('Error %s on %s while rendering portlet %s'%(error.type, error.value, slot[0])) or
                                            '&lt;div class=\'error\'&gt;Error %s on %s: %s&lt;/div&gt;' % (error.type, slot[0], error.value)"
                       tal:define="pathexpr python:slot[0];
                                   usemacro python:slot[1];">
        <tal:block tal:condition="usemacro">
            <metal:block metal:use-macro="python:path(pathexpr)" />
        </tal:block>
        <span tal:condition="not: usemacro"
              tal:replace="structure python:path(pathexpr)" />
        </tal:dontcrash>
    </metal:block>
</metal:leftcolumn>

<metal:rightcolumn define-macro="right_column"
   tal:define="Iterator python:modules['Products.CMFPlone'].IndexIterator;
               tabindex python:Iterator(pos=20000, mainSlot=False);"
   tal:condition="sr">
    <metal:block tal:repeat="slot sr">
        <tal:dontcrash tal:define="pathexpr python:slot[0];
                                   usemacro python:slot[1];">
        <tal:block tal:condition="usemacro">
            <metal:block metal:use-macro="python:path(pathexpr)" />
        </tal:block>
        <span tal:condition="not: usemacro"
              tal:replace="structure python:path(pathexpr)" />
        </tal:dontcrash>
    </metal:block>
</metal:rightcolumn>

</body>
</html>

以下是主要的_模板:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" 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"
      i18n:domain="plone">
<body>
<metal:leftcolumn define-macro="left_column"
   tal:define="Iterator python:modules['Products.CMFPlone'].IndexIterator;
               tabindex python:Iterator(pos=10000, mainSlot=False);"0
   tal:condition="sl|nothing">
    <metal:block tal:repeat="slot sl">
        <tal:dontcrash tal:on-error="structure python:context.plone_log('Error %s on %s while rendering portlet %s'%(error.type, error.value, slot[0])) or
                                            '&lt;div class=\'error\'&gt;Error %s on %s: %s&lt;/div&gt;' % (error.type, slot[0], error.value)"
                       tal:define="pathexpr python:slot[0];
                                   usemacro python:slot[1];">
        <tal:block tal:condition="usemacro">
            <metal:block metal:use-macro="python:path(pathexpr)" />
        </tal:block>
        <span tal:condition="not: usemacro"
              tal:replace="structure python:path(pathexpr)" />
        </tal:dontcrash>
    </metal:block>
</metal:leftcolumn>

<metal:rightcolumn define-macro="right_column"
   tal:define="Iterator python:modules['Products.CMFPlone'].IndexIterator;
               tabindex python:Iterator(pos=20000, mainSlot=False);"
   tal:condition="sr">
    <metal:block tal:repeat="slot sr">
        <tal:dontcrash tal:define="pathexpr python:slot[0];
                                   usemacro python:slot[1];">
        <tal:block tal:condition="usemacro">
            <metal:block metal:use-macro="python:path(pathexpr)" />
        </tal:block>
        <span tal:condition="not: usemacro"
              tal:replace="structure python:path(pathexpr)" />
        </tal:dontcrash>
    </metal:block>
</metal:rightcolumn>

</body>
</html>
<metal:page define-macro="master"><metal:doctype define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:doctype>
<metal:block define-slot="top_slot" />
<metal:block use-macro="here/global_defines/macros/defines" />
<html xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="en"
      lang="en"
      tal:attributes="lang language;
                      xml:lang language">
  <tal:cache tal:define="lang language;
                         charset site_properties/default_charset|string:utf-8">
    <metal:cache use-macro="here/global_cache_settings/macros/cacheheaders">
      Get the global cache headers located in global_cache_settings.
    </metal:cache>
  </tal:cache>
  <head metal:use-macro="here/header/macros/html_header">
    <metal:fillbase fill-slot="base">
      <metal:baseslot define-slot="base">
        <base href="" tal:attributes="href here/renderBase" />
      </metal:baseslot>
    </metal:fillbase>
    <metal:headslot fill-slot="head_slot">
      <metal:headslot define-slot="head_slot" />
      <tal:comment replace="nothing"> A slot where you can insert elements in the header from a template </tal:comment>
    </metal:headslot>
    <metal:styleslot fill-slot="style_slot">
      <tal:comment replace="nothing"> A slot where you can insert CSS in the header from a template </tal:comment>
      <metal:styleslot define-slot="style_slot" />
    </metal:styleslot>
    <metal:cssslot fill-slot="css_slot">
      <tal:comment replace="nothing"> This is deprecated, please use style_slot instead. </tal:comment>
      <metal:cssslot define-slot="css_slot" />
    </metal:cssslot>
    <metal:javascriptslot fill-slot="javascript_head_slot">
      <tal:comment replace="nothing"> A slot where you can insert javascript in the header from a template </tal:comment>
      <metal:javascriptslot define-slot="javascript_head_slot" />
    </metal:javascriptslot>
  </head>
  <body tal:attributes="class here/getSectionFromURL;
                        dir python:test(isRTL, 'rtl', 'ltr')">
    <div id="visual-portal-wrapper">
      <div id="portal-top" i18n:domain="plone">
        <div id="portal-header">
            <p class="hiddenStructure">
                <a accesskey="2"
                   tal:attributes="href string:${current_page_url}#documentContent"
                   i18n:translate="label_skiptocontent">Skip to content.</a> |
                <a accesskey="6"
                   tal:attributes="href string:${current_page_url}#portlet-navigation-tree"
                   i18n:translate="label_skiptonavigation">Skip to navigation</a>
            </p>
             <div metal:use-macro="here/global_siteactions/macros/site_actions">
               Site-wide actions (Contact, Sitemap, Help, Style Switcher etc)
             </div>
             <!--div metal:use-macro="here/global_searchbox/macros/quick_search">
               The quicksearch box, normally placed at the top right
             </div-->
             <a metal:use-macro="here/global_logo/macros/portal_logo">
               The portal logo, linked to the portal root
             </a>
             <!--div metal:use-macro="here/global_skinswitcher/macros/skin_tabs">
               The skin switcher tabs. Based on which role you have, you
               get a selection of skins that you can switch between.
             </div-->
             <div metal:use-macro="here/global_sections/macros/portal_tabs">
               The global sections tabs. (Welcome, News etc)
             </div>
          </div>
          <div metal:use-macro="here/global_personalbar/macros/personal_bar">
            The personal bar. (log in, logout etc...)
          </div>
          <!--div metal:use-macro="here/global_pathbar/macros/path_bar">
            The breadcrumb navigation ("you are here")
          </div-->
      </div>
      <!--div class="visualClear" id="clear-space-before-wrapper-table" /-->
      <tal:comment replace="nothing">
      The wrapper table. It contains the three columns. There's a table-less
      alternative in the plone_tableless skin layer that you can use if you
      prefer layouts that don't use tables.
      </tal:comment>
      <table id="portal-columns">
        <tbody>
          <tr>
            <tal:comment replace="nothing"> Start of the left column </tal:comment>
            <td id="portal-column-one"
                metal:define-slot="column_one_slot"
                tal:condition="sl">
              <div class="visualPadding">
                <metal:portlets define-slot="portlets_one_slot">
                  <metal:leftportlets use-macro="here/portlets_fetcher/macros/left_column">
                    This instruction gets the portlets (boxes) for the left column.
                  </metal:leftportlets>
                </metal:portlets>
                &nbsp;
              </div>
            </td>
            <tal:comment replace="nothing"> End of the left column </tal:comment>
            <tal:comment replace="nothing"> Start of main content block </tal:comment>
            <td id="portal-column-content"
                tal:define="tabindex python:Iterator(pos=0, mainSlot=True)">
              <metal:block define-slot="content">
                <div id="content"
                     metal:define-macro="content"
                     tal:define="show_border python:here.showEditableBorder(template_id=template_id, actions=actions );"
                     tal:attributes="class python:test(show_border,'documentEditable','')">
                  <metal:ifborder tal:condition="show_border" >

                    <tal:block tal:condition="not:here/isAnonymousUser">
                    <div metal:use-macro="here/global_contentviews/macros/content_views">
                      The content views (View, Edit, Properties, Workflow)
                    </div>
                    <div metal:use-macro="here/global_contentviews/macros/content_actions">
                      The content bar
                    </div>

                    </tal:block>

                  </metal:ifborder>
                  <div class="documentContent" id="region-content">
                    <a name="documentContent"></a>
                    <div metal:use-macro="here/global_statusmessage/macros/portal_message">
                      Portal status message
                    </div>

                    <metal:bodytext metal:define-slot="main" tal:content="nothing">
                      Page body text
                    </metal:bodytext>
                    <metal:sub metal:define-slot="sub">
                      <metal:discussion use-macro="here/viewThreadsAtBottom/macros/discussionView" />
                    </metal:sub>
                  </div>
                </div>
              </metal:block>
            </td>
            <tal:comment replace="nothing"> End of main content block </tal:comment>
            <tal:comment replace="nothing"> Start of right column </tal:comment>
            <td id="portal-column-two"
                metal:define-slot="column_two_slot"
                tal:condition="sr">
              <div class="visualPadding">
                <metal:portlets define-slot="portlets_two_slot">
                  <metal:rightportlets use-macro="here/portlets_fetcher/macros/right_column">
                    This instruction gets the portlets (boxes) for the right column.
                  </metal:rightportlets>
                </metal:portlets>
                &nbsp;
              </div>
            </td>
            <tal:comment replace="nothing"> End of the right column </tal:comment>
          </tr>
        </tbody>
      </table>
      <tal:comment replace="nothing"> end column wrapper </tal:comment>
      <div class="visualClear" id="clear-space-before-footer"><!-- --></div>

      <hr class="netscape4" />
      <metal:block i18n:domain="plone">
        <metal:footer use-macro="here/footer/macros/portal_footer">
          Footer
        </metal:footer>
        <metal:colophon use-macro="here/colophon/macros/colophon">
          The colophon area - contains details about the production of
          the site. Typically "powered by" buttons, standards, tools used.
        </metal:colophon>
      </metal:block>
    </div>
</body>
</html>
</metal:page>

获取位于全局缓存设置中的全局缓存标头。
一个可以从模板中在标头中插入元素的插槽
一个可以从模板中在标题中插入CSS的插槽
这已弃用,请改用样式槽。
一个可以在模板的头中插入javascript的窗口

|

站点范围的操作(联系人、站点地图、帮助、样式切换器等) 链接到门户根目录的门户徽标 “全局部分”选项卡。(欢迎、新闻等) 私人酒吧。(登录、注销等) 包装表。它包含三列。少了一张桌子 plone_无桌皮肤层的替代品,如果您需要,可以使用 首选不使用表的布局。 左栏开始 此指令获取左列的portlet(框)。 左列末尾 主内容块的开始 内容视图(视图、编辑、属性、工作流) 内容栏 门户状态消息 页面正文文本 主内容块的结尾 右栏开始 此指令获取右列的portlet(框)。 右栏末尾 端列包装器
似乎这不是问题的根源。将打开另一个具有适当信息的查询


谢谢你的关注

你能粘贴整个模板吗?