Posted by mh86 on August 7, 2008 at 10:22am
| Project: | Content Construction Kit (CCK) |
| Version: | 6.x-2.x-dev |
| Component: | fieldgroup.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
In the drupal-5 version, the fieldgroup module had a higher weight in the system table. In the drupal-6 version, the update is missing.
Increasing the module weight has an big advantage, it simplifies altering fields in hook_form_alter() before they are moved into fieldgroups. Fields would always be directly accessible by their field name (e.g. $form['field_name']) instead of manually checking for fields nested in groups.
The following patch adds an update function (fieldgroup_update_6001()) which increases the module weight to 9 (as it was previously done in fieldgroup_update_4()).
| Attachment | Size |
|---|---|
| fieldgroup_weight.patch | 1.13 KB |
Comments
#1
updated patch, which fixes problems in the previous one. I added the update query, which sets the module weight, to the fieldgroup_install() function too.
Additionally I removed
variable_set('fieldgroup_schema_version', 6000);from the install hook, because as far as I can see, the schema_version gets set automatically to the newest version this way or the other.#2
This was present in D5 fieldgroup_install(), not sure why this disappeared.
Fixed (not your exact patch, so be sure to update your code). Thanks.
Note : 'fieldgroup_schema_version' is a hack used to track internal schema changes - we leave it unchanged unless an update function changes the actual db structure for the module.
Side note : looking at this part of code, it seems we don't have any update function that changes table names from D5 node_group* to D6 content_group* ? Meaning we curently lose fieldgroup info on update ? I'll double check that...
#3
Automatically closed -- issue fixed for two weeks with no activity.