python - Plone : unbound prefix in configure.zcml -
i developing new add-on plone site result showing error in
configure.zcml : unbound prefix.
here writing zcml code :
<configure xmlns="http://namespaces.zope.org/zope" xmlns:five="http://namespaces.zope.org/five" xmlns:i18n="http://namespaces.zope.org/i18n" i18n_domain="customer.reports"> <five:registerpackage package="." initialize=".initialize" /> <include package="plone.resource" file="meta.zcml"/> <plone:static directory="templates" type="reports" name="customer" /> </configure>
unbound prefix error mentioned below.
file "/plone/python-2.7/lib/python2.7/xml/sax/handler.py", line 38, in fatalerror raise exception zope.configuration.xmlconfig.zopexmlconfigurationerror: file "/plone/zinstance/parts/instance/etc/site.zcml", line 16.2-16.23 zopexmlconfigurationerror: file "/plone/buildout-cache/eggs/products.cmfplone-4.3-py2.7.egg/products/cmfplone/configure.zcml", line 98.4-102.10 zopesaxparseexception: file "/plone/zinstance/src/customer.reports/customer/reports/configure.zcml", line 13.2, unbound prefix
this error indicates you're missing namespace declaration @ top of configure.zcml. try including 1 of following in configure tag:
xmlns:plone="http://namespaces.plone.org/plone"
as added above line in code fix unbound error before using plone register add-on not declare correct namespace i.e. plone @ name space declaration block of zcml file
<configure xmlns="http://namespaces.zope.org/zope" xmlns:five="http://namespaces.zope.org/five" xmlns:i18n="http://namespaces.zope.org/i18n" xmlns:plone="http://namespaces.plone.org/plone" i18n_domain="customer.reports"> <five:registerpackage package="." initialize=".initialize" /> <!-- -*- stuff goes here -*- --> <include package="plone.resource" file="meta.zcml"/> <plone:static directory="templates" type="reports" name="customer" /> </configure>
Comments
Post a Comment