From: Rob M. <ra...@bu...> - 2006-03-14 20:06:07
|
On Mar 14, 2006, at 8:32 AM, Jock Coats wrote: > Though I've been playing with Plone and Zope for, wow, a couple of > years now I have not so far got down to too much mucking around in > code. But now I want to create a customised member type with lots > of additional data to collect (it's for an alumni site so I want > eventually to capture data about when they left the school and so on). > > So, I followed this: > > http://plone.org/products/archetypes/documentation/old/wiki/ > SubclassCMFMember/ > > ...to see if I could get such a basic customisation going. After > some fiddling (mostly because of typos in the code) I finally got > the new type, AlumniMember to show up in the quickinstaller and to > install with no apparent errors. > > However, when I then create a Plone site, install CMFMember and > AlumniMember, migrate to CMFMember, I would then expect to see > "AlumniMember" available in the available member type field. But > it doesn't seem to appear. If I install Samplex, the SamplexMember > type shows up and allows me to set it as default, but not my one. > Nor is there any entry for my type in the archetypes_tool. So I'm > thinking I have failed to register the type properly. But it's not > entirely clear from the LiMi document cited above where i am > supposed to do that. i'm not sure what's missing from your code, but since the SamplexMember _is_ showing up, i'd say to take a good look at the way that Samplex is handling it, and look for any differences. you might consider modeling your custom member class after SamplexMember rather than the one in the older wiki page. > Further to all this, I wanted to use the basic subclass idea as a > basis on which I could then use ATSchemaEditor to give it some more > fields. If I set the USE_SCHEMA_EDITOR = True line in the > config.py of CMFMember it seems to throw errors during the > migration about not finding the Schema - something I've seen > mentioned in other posts on this list but not quite understanding > how to rectify it. > > Do I need to turn USE_SCHEMA_EDITOR on for CMFMember, or somewhere > for my subclass only? It is, after all, only my Subclass I > actually want to edit! USE_SCHEMA_EDITOR is a global setting, not one that you'd turn on just for your type. i have no idea what errors you're seeing, though... it would help if you could file a bug report w/ a complete description of the exact steps that you took and a full traceback. -r |