D7 - CCK in Core?
If you're a Drupal developer, you're aware, no doubt, of the coming of D7. One of the exciting changes in D7 is that CCK has been brought into core...somewhat. The changes provide opportunities to do things that were much more difficult to do before, but also, might create a black hole of challenges in the migration space between D6 and D7. The meat of the absorption of CCK into core is the creation of entities, similar to the defunct content types, and fields. Entities do not have to be content, which is why the aren't called content types, and are 'fieldable'...they can have fields added to them.
- user is now an entity
- comment is now an entity
- taxonomy is now an entity
New field types have been added:
- image (formerly imagefield)
- file (formerly filefield)
- body/teaser (a teaser can be a subset of the body text, as it is now, or completely different text)
- list (formerly a text field containing an allowed values list) with boolean, numeric and text key types
Fields are now translatable. For example, instead of
there will be
with the constant FIELD_LANGUAGE_NONE as the default.
This is all good news, to this point. However, the reference fields, nodereference and userreference, did not become part of core. This is a huge problem, because there is no 'entityreference' field type at all, and that leaves no native way to tie entity instances together. Hopefully this will be one of the first contributed modules for D7.
Also, moving fields into core did not also move their discovery into core. That is, all of the modules that made use of CCK fields will now need to provide their own field integration, or, a field integration module for general use will need to be developed for the other modules to use.
For a fact-filled presentation on the topic of CCK in D7, see CCK To Fields, Getting There From Here by Karen Stevenson