Drupalcon notes: CCK to Fields - Getting There From Here
Flexinode was available from 2004-2007, versions 4.4-4.7. It introduced the idea of custom content types. Problem: it didn't work at all in Views. Was rewritten to scale better. CCK, the successor, lived from 2007-2010, in versions 4.7 to 6.x.
Early on, it was table-segregated by type of data: text, integer, etc. Didn't last long. Now: if the same field exists in multiple content types, it all goes in the same table.
Field data architecture: change settings or share a field after data was created could lead to potential data loss. They settled on using a per-field storage for all fields, so that data never moves.
Database optimization
- per bundle storage at http://drupal.org/project/pbs
- materialized view: http://drupal.org/project/materialized_views
Module upgrades
- Use Coder and Coder Upgrade module and then start on field issues -- http://drupal.org/project/coder
- Upgrade documentation at http://drupal.org/node/728792
Data upgrades
- May not be a normal upgrade. Likely an upgrade page listing all fields and upgrade status
- Issue to track: http://drupal.org/node/366364
- You can't upgrade to D7 partially. All the field modules have to go at once
- The tables can live in your D6 tables - because we're copying from old tables to new.
- No contrib modules are completely ready yet
New fieldable entities
- Users - were entities but not fieldable
- Comments - http://drupal.org/node/504666
- Taxonomy - http://drupal.org/node/413192
New core fields
- Body & teaser: http://drupal.org/node/3722743
- Comments: http://drupal.org/node/538164
- Taxonomy: http://drupal.org/node/412518
- Filefield / imagefield: moved to core. Upload module is deprecated as a result - http://drupal.org/node/391330 and http://drupal.org/node/560780 - there is no upgrade path yet
New field type: list
- New 'list' field type in core
- Boolean, numeric, or alpha keys
- Allowed values as textarea with 'key | value' pairs
- Allowed values from PHP in CCK
Translatable fields
-
$node->body[0]value
is deprecated for$node->body[$langcode][0][value]
-
$langcode = FIELD_LANGUAGE_NONE;
- http://drupal.org/node/367595
User Profile fields
- D7 core: user fields and profile module.
- Create a new 'profile' entity in contrib?
- http://drupal.org/node/394720
- http://drupal.org/node/301071
- http://drupal.org/project/profile2
Nodereference
- Still in CCK but functional.
- Move to separate module? http://drupal.org/project/noderelationships -- this is a bidirectional version of nodereference
- http://drupal.org/node/533222
- Right now, no Views integration?!
Userreference
- Still in CCK but functional
- Move to new module? No immediate candidates
- http://drupal.org/node/533222
Fieldgroup
- Still in CCK. NON-functional.
- Move to module: No immediate candidates
Content Permissions
- Still in CCK. NON-functional.
- Move to new module? http://drupal.org/project/field_permissions
- How to do this so that you don't get a huge slew of fields listed in /admin/user/permissions ?
Content Copy
- Still in CCK. NON-functional
- Move to new module? http://drupal.org/project/content_type_exporter
Views, Devel Generate, Diff, Rules
- All of these are still contrib, so integration is not in core.
Token
Token functionality is now in core but token integration is still in contrib.
Multigroup
- Might be able to create a field which is itself a fieldable entity to inherit this function
- http://drupal.org/node/695636
- http://drupal.org/node/494100