Drupal 7 CCK installation
Has anyone managed to install CCK on drupal 7? I am getting lots of errors.
The rea开发者_开发技巧son that i want that is because CCK does not create 2 tables per field, it creates only one table per content type which is more efficient.Thanks
In Drupal 7 CCK is part of the Core, so you don't need to install it separately (and you neither can, since it has no 7.x release).
The "two tables" issue for Drupal 7's FieldAPI relates specifically to the split between "current data" for an entity's fields, and "old data" for saved revisions. CCK in Drupal 6 only applied to nodes, and could assume that revision data was always going to be meaningful. In Drupal 7, fields can be attached to any entity type, whether it supports revisions or not.
As such, revisioned entities get two tables: one for the current data and one for old revisions. If I understand the current code correctly, non-revisioned entities like User accounts get a single table per field. It was a compromise, but it's a compromise that's now baked into Drupal Core -- installing the CCK module itself won't change that.
It is possible that if you're really, REALLY determined you can implement an alternative Field Storage plugin mechanism that doesn't create the extra table. I'd suggest not going that far, though: the payoff is not likely to be worth it.
The cck module is offered for Drupal 7. However this revision only includes the cck features that were not included in core. I have managed to install this module on my drupal 7 website without any errors. Try downloading the latest version.
精彩评论