[development] Fun CCK idea.

Michael Prasuhn mike at mikeyp.net
Thu May 31 19:20:15 UTC 2007

On May 31, 2007, at 12:05 PM, adrian rossouw wrote:

> On 31 May 2007, at 8:48 PM, Sean Robertson wrote:
>> Can you do this now with drupal_execute?  How about actions?
> yeah. i can't see a reason why it can't be done now.
> Actions should be possible too, but you'd have to introduce a  
> couple more hooks.
> Also. i wonder how updating would work. Removing fields could be  
> weird.

content_copy.module *already* is using drupal_execute, and doing some  
interesting things to make this possible under the most perfect of  
conditions. If one really wants to just create some types, that they  
have built and tested and imported to check the validation on a real  
site, one can very clumsily pass functions to the existing submit  
handler, or duplicate it, and change a few lines so that you are  
passing the field definition in as a keyed array. However it is still  
very fragile as Eaton said, and not something you want to try to code  
without testing extensively on a real site. I'm routinely able to  
break the import with the current release of content_copy.module.

I'm with Eaton, to make this work well, will require a rewrite of the  
import functions of content_copy.

Michael Prasuhn
mike at mikeyp.net

More information about the development mailing list