Reputation: 40985
I have created a new product. I am able to install and uninstall it.
However, I have created a view, callable from an action(actions.xml) but I keep getting an error saying the page does not exist
This page does not seem to exist…
here is my actions.xml
<?xml version="1.0"?>
<object name="portal_actions" meta_type="Plone Actions Tool"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<action-provider name="portal_workflow"/>
<action-provider name="portal_types"/>
<action-provider name="portal_actions"/>
<object name="document_actions" meta_type="CMF Action Category">
<object name="viewCatTree" meta_type="CMF Action" i18n:domain="plone">
<property name="title" i18n:translate="">Category Tree</property>
<property name="description" i18n:translate=""></property>
<property name="url_expr">string:${object_url}/visual_tree_view</property>
<property name="icon_expr"></property>
<property name="available_expr"></property>
<property name="permissions">
<element value="View"/>
</property>
<property name="visible">True</property>
</object>
<!-- more actions here -->
</object>
This is how I've specified it in configure.zcml
<browser:page
for="*"
name="visual_tree_view"
class=".viewlets.CategoryTreeSettingsView"
template="../skins/category_customizations/category_view.pt"
permission="zope2.View"
/>
I've also tried adding the @@ before the view name in the browser, but the page cannot be found. The template exists in the skins folder and it does not matter whether I change the above code to point to /templates/category_view.pt
Any ideas?
Upvotes: 2
Views: 363
Reputation: 1121266
I suspect your view is raising an AttributeError or KeyError when rendered, which would also cause Plone to display a NotFound error.
Put a debug breakpoint in your view __call__
and / or __init__
methods to see if your view is being looked up and called.
That, or your configure.zcml
is not being loaded at all; make sure your package is included somewhere, perhaps in the zcml
variable in the plone.recipe.zope2instance
part of your buildout, or in a <include />
statement in another configure.zcml file.
Upvotes: 2