[development] Fun CCK idea.

Jeff Eaton jeff at viapositiva.net
Thu May 31 19:02:48 UTC 2007


For the SonyBMG project that Lullabot put together, we had to build a  
profile that created close to a dozen CCK types at install time,  
added fields, etc. It works, but there are a lot of application- 
specific hacks that had to be done to make it work well with the  
current system.

content_copy.module is useful but extremely, EXTREMELY brittle. There  
are lots of ways to make it break. There are even more ways to make  
it break when you're trying to automate it. Modules that add fields  
to the content type admin screen can break it too. I would go so far  
as to say that it is a solution for those who need to *record their  
current configuration options*, NOT a tool for actual site  
provisioning. That is in no way a knock on those who developed it --  
the CCK internals it's working with are thorny and not meant to be  
used in this way. I just want to warn anyone who thinks it'd be a  
quick tweak that things are not what they seem.

For the idea to be a reality, CCK needs actual honest-to-goodness  
granular CRUD functions underneath the surface, and any forms it uses  
for configuration purposes need to call those CRUD functions instead  
of overloading the validate and submit handlers. We also need to hash  
out what happens when Field plugins change their settings  
definitions, etc, what happens when the in-module definition for a  
content type changes, etc. Right now it only works for the creation  
of new node types from scratch.

--Jeff


On May 31, 2007, at 1:48 PM, Sean Robertson wrote:

> Can you do this now with drupal_execute?  How about actions?
>
>
>
> adrian rossouw wrote:
>> I was thinking it would be cool if we could have a way for CCK  
>> node types to be defined by modules.
>> The same way that modules can provide default views.
>> A quick way to do this would be to just have a module that  
>> generates a module for node types, generating the .info, and  
>> the .install ..
>> and probably a dummy .module.
>> this could really help with install profiles.



More information about the development mailing list