On Fri, 2009-06-05 at 20:14 +1200, Tim Knapp wrote:

<snip />

> Well after some more hunting through the code it appears that the
> creation of the remember objects is invoked via the createMember.cpy
> script, which creates a member object via portal_factory in the
> portal_memberdata tool, and returns reg_form.cpt (hence circumventing
> the browser view), and then eventually calls another script
> (do_register.cpy), which does:
> 
> <code>
> new_context = getToolByName(context, 'portal_factory').doCreate(context,
> id)
> new_context.processForm()
> </code>
> 
> so IOW it completely bypasses the formlib PageAddForm we created.

After some 'more' hacking, I have got the portal_factory to create the
object using my auto-generated id by doing the following:
     1. Removing 'validate_registration' from reg_form.cpt.metadata
        (validators) - I think the better way would possibly be to
        ensure validate_id method in the member class is returning None
        (still need to confirm this).
     2. Modifying do_register.cpy as follows[1].

Unfortunately it still errors as follows[2]. I can confirm that it has
definitely renamed the object but it appears to be trying to traverse to
the old id. Any ideas on how to get around this?

Thanks again,
Tim

[1] http://duffyd.pastebin.com/f63609c7e
[2] http://duffyd.pastebin.com/f540d2840

> 
> Thanks,
> Tim
> 
> > 
> > Hedley
> > 
> > 
> > --
> > Archive: 
> > http://www.openplans.org/projects/remember/lists/remember/archive/2009/06/1244187196967
> > To unsubscribe send an email with subject "unsubscribe" to 
> > [email protected].  Please contact 
> > [email protected] for questions.
> > 
> 
> 
> 
> --
> Archive: 
> http://www.openplans.org/projects/remember/lists/remember/archive/2009/06/1244189723212
> To unsubscribe send an email with subject "unsubscribe" to 
> [email protected].  Please contact 
> [email protected] for questions.
> 



--
Archive: 
http://www.openplans.org/projects/remember/lists/remember/archive/2009/06/1244197519925
To unsubscribe send an email with subject "unsubscribe" to 
[email protected].  Please contact 
[email protected] for questions.

Reply via email to