[Zope3-dev] Why does the following browser configuration fail?

Gary Poster gary at zope.com
Fri Feb 24 16:37:11 EST 2006


On Feb 24, 2006, at 4:27 PM, Morten W. Petersen wrote:

> Hi,
>
> I have the following browser configuration:
>
> <configure
>         xmlns="http://namespaces.zope.org/zope"
>         xmlns:browser="http://namespaces.zope.org/browser"
> >
>
>   <browser:addMenuItem
>         title="Recipe"
>         class="worldcookery.recipe.Recipe"
>         permission="zope.ManageContent"
>         view="AddRecipe.html"
>   />
>
> <!--
>   <browser:addform
>         schema="worldcookery.interfaces.IRecipe"
>         content_factory="worldcookery.recipe.Recipe"
>         label="Add Recipe"
>         name="AddRecipe.html"
>         permission="zope.ManageContent"
>   />
>
>   <browser:editform
>         schema="worldcookery.interfaces.IRecipe"
>         label="Edit"
>         name="edit.html"
>         menu="zmi_views" title="Edit"
>         permission="zope.ManageContent"
>   />
> -->
>
> </configure>
>
> which fails when the two last options are commented out, but works  
> fine when none are commented out.  Is there a reason why it fails  
> when the two last .. directives are commented out?

On a guess, I'd say that the editform could be commented out without  
effect.  The add menu item probably complains if the page to which it  
refers (AddRecipe.html) is not actually provided (by the addform).   
That's just a guess.

zcml tracebacks actually do generally have the necessary information  
to help debug them, actually; it's just not necessarily where you  
expect.  Read up from the bottom of the traceback and I suspect  
you'll find something helpful eventually, maybe several frames up.

If not, try including the traceback in a reply and see if anyone has  
any bright ideas.

Gary


More information about the Zope3-dev mailing list