CCK 6.x and Beyond

Last updated on
24 April 2025

In the CCK 6.x and Beyond presentation we discussed the roadmap of what will be changing in Drupal 6.x and some ideas of what will happen with CCK in core for 7.x. The table below summarizes issues and their status. Phase I activities must get done before a D6 version can be released. Phase II activities may not get done until later, but we do hope to get them into the D6 version at some point.

Find the video here: http://www.drupal.cat/node/472

Item Description Status Who, What, How
Schema API Schema API has moved many things that CCK was doing to core, so CCK must be rewritten to take advantage of this. This will elminate a lot of code and make some new field types available, like a real decimal field instead of a float and a real datetime field. D6 Phase I Done
Formatters Formatters will become thin wrappers around theme functions. Each formatter will consist of a theme function to control the display of an item. The content module will add #theme to the node array with the appropriate formatter theme and then display it using drupal_render(). Module developers will need to rework their formatters to be sure a theme function exists for each individual formatter. D6 Phase I Done(#213279)
Multiple Values There have been many requests for a way to control the number of multiple values and a nice javascript 'add more' button. This will be made possible by moving handling for multiple values from the field modules to the content module. The field modules will now only create a single element and the content module will call hook_widget as many times as necessary to create the combined form element with all the multiple values. Field modules that don't want this behavior can opt out of it and do their own handling of multiple values. D6 Phase I Done
FAPI Widgets were not using the Forms API (FAPI) to do their processing. That meant that people had to learn both the CCK way of creating form elements and the FAPI way of doing it. There is no need for CCK to create its own version of things FAPI can do, so form processing will now be done by declaring hook_elements() and using #process and #element_validate for element processing, rather than by having CCK repeatedly invoke hook_widget() to do it. The new code will make widget element agnostic about what they are attached to so that they could possibly be attached to anything, including each other. D6 Phase I Done
Translation Drupal 6 now has a method to store translated versions of node information, and CCK needs to implement a method of pre-populating translated versions of field data. D6 Phase I Done
Views 2 Hooks Views is being rewritten for D6. Once it is done, we will need to rewrite the Views hooks in CCK to match the new methods. D6 Phase I In progress and mostly working, requires current development release of Views 2
Node Styles Core now provides a way to allow nodes to know if they are being called in order to index them for searching or for RSS feeds instead of for page or teaser views. The Display Fields tab should allow those options so you you can set a field display that is different than full page or teaser views. D6 Phase I Done
Empty = NULL There have been many requests to be able to search fields for those with empty or not empty values. This is difficult because depending on the field types, empty can be stored as 0, empty string, NULL... For D6 we will require fields to allow NULL values and use NULL as the empty value, so we can add a way to search for empty values. D6 Phase I Done
CCK uninstall When someone uninstalls a field module, CCK needs to remove the proper data from the database. We need to require field modules to add an uninstall that uses content module's uninstall process so the right fields and tables are dropped. D6 Phase I Done
Add .tpl files Should make use of theme preprocessor and field.tpl.php templates. D6 Phase I Done for field.tpl. Should probably be separated in separate styles (ul, ol, div, comma separated)
Empty Values Need to move process of removing empty values from field modules to content module so it can be handled consistently. Add a new hook_content_is_empty() so fields can tell content module if an item's value should be considered empty or not. D6 Phase I Done
UI Improvements There are a number of places we could use jQuery for usability improvements to the UI. We would like to dynamically change the Manage Fields screen without requiring page submission. Another possible improvement is to automatically update the widget options on the field settings page if you change the widget. Currently you must submit that change and re-edit the settings in order to see the settings for the new widget when you do this. D6 Phase II Drag 'n drop has been added to Manage Fields screen. Updating the widget settings dynamically is to be done
CCK API There have been many requests for a real API for CCK to make it easier to programmatically create content types and add fields and widgets to them. This is a very important, but potentially time-consuming project. Lots of things need to be considered, like whether users will be able to alter and delete fields that have been programmatically submitted. D6 Phase II Partly in place, more to come.
Plugable Validators There has been a lot of talk about creating libraries of plugable validators that would allow you to select which validator(s) you want to use on a field.
A clean approach has been sketched out at #212665, anyone welcome to take this over.
D6 Phase II To be done
Field Permissions We have wanted to add a method to set field-level permissions for a long time. FAPI now makes this easy to do, but it is not yet clear what would be the best UI. If possible, we would like to get this working sometime in the D6 cycle. D6 Phase II To be done
Advanced field translation settings Additional features about field values across node translations can be envisioned : allow admin to force some fields to be shared (for instance, a number field...). To be determined : do we allow edition only on the source node, how do we propagate the values, etc... D6 Phase II To be done
Panels 2 Hooks Panels is being rewritten for D6. Once it is done, we will need to add Panels 2 hooks to CCK. D6 Phase II To be done when Panels 2 for D6 is ready.
Batch Processing for Mass Updates Some field changes require changes in the database storage and there could be timeout problems getting all that data moved. There is new batch processing handling available in D6 that will help avoid that problem. Also, we do not yet cleanly removed data when fields are deleted because of timeout problems, and we should get that fixed in this version. Phase II Done
CCK in 7 Our current plan for CCK in core in D7 is that we will try to get the CCK API into core so nodes have the ability to add and track fields. The content module would remain as a contrib module that provides a nice UI to do that, but other modules can count on the API being available in core so they can manipulate fields themselves. D7 To be done

Help improve this page

Page status: Not set

You can: