Asbjørn Andersen wrote:
>
> Did you find a solution for this? I'm having the same issue...
>
> Regards, Asbjørn Andersen
>
The code above does look correct. I'd try to verify that the ZCML is
actually processed. Introduce a syntax error in the ZCML file where you have
the <adapter /> registration, and see if Zope fails to start up (in fg
mode). If not, then you've forgotten to <include /> this file from
somewhere, possibly by forgetting a ZCML slug.
Alternatively, the problem could be that the database_settings() factory
adapter method returns None or throws an error. You can test that by putting
a pdb statement in the function to see if it's called at all, and if so,
whether it returns an error. It could, for example, be that the getUtility()
call fails to find a utility, possibly because you haven't installed the DB
settings utility (which would be done with componentregistry.xml) or because
you're outside the Plone site when it happens, e.g. you're in the ZODB root
(unlikely with a control panel, of course).
Cheers,
Martin
--
View this message in context:
http://n2.nabble.com/Newbie%3A-Control-panels-%28Aspelli%27s-book%2C-chapter-12%29-tp356745p2181621.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers