Plone 4.1.2の最新プロフェッショナルPlone 4開発ブックを使用しています。敏捷性タイプに新しいビューを追加すると「ページが見つかりません」という表示アイテムが表示される
私はDexterityを使用してコンテンツタイプを正常に定義しましたが、現在そのタイプのいずれかのカスタムビューを作成しようとしています。スキーマ&ビューは、次のような定義されています。 ビューCTCCに位置 偽
<alias from="(Default)" to="(selected layout)"/>
<alias from="edit" to="@@edit"/>
<alias from="sharing" to="@@sharing"/>
<alias from="view" to="@@view"/>
<action title="View" action_id="view" category="object" condition_expr=""
url_expr="string:${folder_url}/" visible="True">
<permission value="View"/>
</action>
そしてテンプレート自体、:ここで
from zope import schema
from plone.directives import form
from five import grok
from ctcc.contenttypes import CTCCTypesMessageFactory as _
class ITrial(form.Schema):
"""A clinical trial."""
title = schema.TextLine(
title = _(u'label_title', default=u'Title'),
required = True,
)
description = schema.Text(
title=_(u'label_description', default=u'Description'),
description = _(u'help_description', default=u'A short summary of the content'),
required = False,
missing_value = u'',
)
class View(grok.View):
grok.context(ITrial)
grok.require('zope2.View')
grok.name('view')
はタイプのFTIから関連するセクションです。 contenttypes/trial_templates/view.pt の説明だけを表示するの説明:
<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="context/main_template/macros/master"
i18n:domain="ctcc.contenttypes">
<body>
<metal:content-core fill-slot="content-core">
<metal:content-core define-macro="content-core">
<div tal:replace="structure context/text/output" />
</metal:content-core>
</metal:content-core>
</body>
</html>
これですべてのタイプのインスタンスにアクセスすると、「ページが見つかりません」というエラーが発生します。何かが新しい見通しを予想通りに結びつけているようではないようですが、これはPloneの最初の1週間なので、これをどこから始めるべきか分かりません。フォアグラウンドモードでサイトを実行しているときにエラーが表示されない。
大変助かります。
GenericSetup XMLで何かを変更した後で、portal_setupで適切な手順を再実行する必要があることに注意してください。 –
ZMIのerror_logに移動し、無視された例外リストからNotFoundを削除します。その後、もう一度ビューに移動し、さらに情報があるかどうかを確認します。 –
@JCブランド:この段階では、GenericSetupファイルをまったく変更していません。機敏さのタイプは作成され、うまく動作します。それはpythonファイルにエラーを出すビューを追加した後です。 ありがとう、私は本当にそれをより明確にして、今更新する必要があります。 –