开发者

browser view zcml for="IPloneSiteRoot" returns 404

I wonder if anyone else has seen this before:

I have the following ZCML:

<browser:page
  for="*"
  name="workflow_action"
  class=".bika_listing.WorkflowAction"
  permission="zope.Public"
/>

When I try to visit siteroot/workflow_action, Plone tells me "This page does not seem to exist…"

The ZCML is being read - if I cause an error in the ZCML, Plone fails to start.

I've tried for="Products.CMFPlone.interfaces.IPloneSiteRoot" with the same result.

The code in WorkflowAction is not being invoked at all - if I place a pdb in __call__, it does not fire.

I have two similar ZCML definitions for different contexts, which work fine and look something like this:

<browser:page
  for="bika.lims.interfaces.IAnalysisRequest"
  name="workflow_action"
  class=".analysisrequest.WorkflowAction"
  permission="zope.Public"
/>

If I remove these other views, leaving only one view in the system with name="workflow_action", (the one for开发者_运维问答 IPloneSiteRoot or "*"), the result is the same.

This seems like a very simple view - I don't know what other information I can put here?

Using Plone 4.0.7.

it must be me!?


Most likely your browserview raises an exception in the __init__() method and so the exception is ignored and never displayed, and the result usually is a 404 error.


I have a similar issue when add a Solgema.NavigationPortlet portlet on a Private state folder, then I found the browser:page navTreeitem in navigation.py raised a KeyError, which cause a 404 response for client browser.

Thanks for Giacomo's answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜