Closed (fixed)
Project:
Features
Version:
6.x-1.0-beta5
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2009 at 16:05 UTC
Updated:
23 Jan 2013 at 17:59 UTC
Jump to comment: Most recent file
Comments
Comment #1
yhahn commentedWill take a look at this -- might need some custom detection as fieldgroups aren't CCK fields themselves but metadata.
Comment #2
TUc commentedWhere would I put the code that makes a fieldgroup and saves my field in it? hook_strongarm() seems not the right place to do such things.
TUc
Comment #3
pbuyle commentedIs this doable ? The fieldgroup module doesn't seems to use exportables. The fieldgroup_groups function fetch the groups definitions from the database. Maybe a fieldgroup issue "Use an exportables architecture to allow integration into features" is needed ?
Comment #4
yhahn commentedSetting to postponed until CCK fieldgroups has exportables.
Comment #5
a_c_m commentedI created the issue in the fieldgroup queue #547572: Use an exportables architecture to allow integration into features
Comment #6
q0rban commentedSeeing as how that issue is now marked as fixed, it doesn't look like the maintainers of CCK have any intentions of adding fieldgroups in the way you're hoping. Re-setting to active.
Comment #7
rickvug commentedSubscribing.
With the response in CCK's issue queue, it looks like there is not a push to change the formatting of fieldgroups at this time. It looks like this will need to be implemented as a special use in the short term. Over the longer term, fieldgroups and other content type layout options need to be easily exportable. This will be especially important come D7 when mode functionality and configuration will be strictly field based.
Comment #8
psynaptic commentedWould be great if fieldgroups/multigroups were exportable so features could export these without manual intervention.
Certainly not suggesting that this is the best way to do it but it does work for now while things get sorted out.
Comment #9
yhahn commentedWe won't be implementing any kind of automatic
hook_install()scripts for setting up fieldgroups and until there are real exportables here don't expect much from Features. You are certainly welcome to script their creation a la #8 in your feature module though.Comment #10
netaustin commentedThis patch tackles this issue in content_features_export, content_features_render, and content_features_rebuild. Using this patch, fieldgroups should work as well as other CCK fields.
This is tested against CCK 6.3 from CVS and supports the new multigroup module, but should work properly with 6.2 stable as well.
Comment #11
dawehnerI tested the patch, it worked well.
Reviewiing it later.
Comment #12
codexmas commentedPatch also worked great for me!
Comment #13
floretan commentedThe patch worked for me too, but I had some trouble while updating features.
With this patch, fieldgroups don't get updated at the same time as CCK fields (clearing all caches resets the fieldgroups but not the fields). I haven't taken an in-depth look at the code, but the issue I had was that when I changed fieldgroup weights, they were reverted before the feature was re-exported, thus putting the field and fieldgroup weights out of sync. My quick solution was to update the weights directly in the exported feature.
Comment #14
nico heulsen commentedPatch also worked great for me! Thx!
Comment #15
lelizondo commentedI'm also having the same problems as #13, patch works but there are some details. The fieldgroup is there but the fields are not inside the fieldgroup, I don't really know how to control this manually with code.
Comment #16
mrfelton commentedI got the patch to apply to the latest code in CVS (had 1 failure, but was easy to fix). I had 2 fieldgroups set up, 1 had 4 fields in it, the other had 2. When I installed the feature on another setup, I had the 2 fieldsets - one had one field inside it, the other had no fields in it!
Comment #17
mrfelton commentedUpdated patch attached. The difference is in
content_features_rebuild(). The bit that does "// Update the group of this field." was not within the foreach loop for the respective field, so only the last field processed would get added to a fieldset. After moving the routine into the foreach loop, all fields are added to the correct fieldset.Works for me - please test.
Comment #18
amitaibuTested and saw no problems. cck_sync module days are getting shorter ;)
Comment #19
randallknutson commentedI was successfully able to export a fieldgroup and inport it somewhere else with patch #17
Comment #20
dsnoeck commentedThanks to the patch #17, it works also fine for me with version 6.x-1.0-beta4. Thanks a lot.
Comment #21
ktha commentedI've encountered an issue after applying patch #17: at some point (probably when you have no group) the "$fields['groups']" value is empty within content_features_rebuild(). In such case the $field entry will NOT be unset (line 167 of the patch). Having an empty "groups" field entry present in the list of fields will lead to some side effects: the following for-loop will handle the empty field through content_field_instance_create(). I think that explains the presence of the odd "content_type_" table in my database.
Comment #22
andrewfn commentedI have just tested out this patch and it applied and worked flawlessly for me. But I have not tried it on content types that have no group as mentioned in #21.
Comment #23
Crell commentedThis is still an issue as of the latest beta. I just got bitten by it as well. :-(
Comment #24
bricef commentedSubscribe, i had this problem today with the last version.
Comment #25
thisgeek commentedPatch #17 seems to have some trouble dealing with features that have multiple content types. I have a feature that has an Author type and a Publication type (in that order). Both have field groups. After applying the patch, I had no trouble getting the Publication field groups to register, but for some reason I had to disable Publication to get the Author field group to register.
I was able to resolve the issue by recreating the feature twice, once with Publication enabled, and once without, merging the changes in my SCM. Obviously, it would be better if I didn't need to do that.
Note: I develop on PHP 5.3.0.
Comment #26
lelizondo commentedpatch in #17 is working for me using beta5, of course, the patch has to be applied to the site where the feature it's being created and the sites where the feature is being used.
Comment #27
darrenmothersele commentedI am using beta5 and successfully applied this patch. The exported code seems to contain the fieldgroup definitions but they are not created when enabling/deploying the feature. I tried clearing cache as mentioned in a previous comment.
I have one content type in the feature with several fieldgroups. I export the feature and enable it - groups are not created and it shows up as 'overridden' straight away.
Importing the cck type using content_copy module after enabling the feature recreates the fieldgroups and feature is reported to be in 'default' state again.
Comment #28
lelizondo commentedThis might seem obvious but, do you have features patched on the site you're applying the feature?
Comment #29
darrenmothersele commentedYes, the same patched version of features on both sites.
Comment #30
liorlp commentedSubscribe, have the same problem
Comment #31
q0rban commentedAssigning to me, am working on a patch now.
Comment #32
q0rban commentedwhoops
Comment #33
q0rban commentedSo, here's my stab at this. This patch departs from previous patches in that it separates out all fieldgroup handling into separate hooks and a separate file. IMO, this is a much cleaner approach. Please test it out!
Comment #34
q0rban commentedUpdated patch fixes translatables.
Comment #35
meecect commented+subscbribe
Comment #36
yhahn commentedPatch looks great. Committed: http://drupal.org/cvs?commit=325370
The component tests should be added next http://drupal.org/node/706950.
Comment #37
cristhian commentedNeither beta5 version with #36 patch nor beta6 version work for me..
beta5 version with #17 works fine, anyone else experiencing the same?
Comment #38
tayzlor commentedtried patching beta 5 with the patch in #34.
patch applies and fieldgroups seem to be exported, however when i enable the feature on a site the fieldgroups do not show on the content types.
Comment #39
mrfelton commentedSee #725132: fieldgroup duplicate entry which is related.
Comment #40
q0rban commentedPlease don't change the status. Download the dev version for fieldgroup support. Thanks!
Comment #42
lpalgarvio commented6.x-1.0
can't export fieldgroups independently from CCK fields or Node types - they don't show on the list.
i have to export nodes to get the fieldgroups.
the nodes also includes the cck fields.
if i export the cck fields, i don't get the fieldgroups.
and since i can't export some node types (blog, forum, poll, panel, product, product_kit), i don't get to export their fieldgroups AT ALL...
Comment #43
q0rban commented@LPCA, I would open a separate issue for what you're experiencing, as this one is closed. Thanks!
Comment #44
myha commentedFor add ability export fieldgroups independently need add hook_features_export_options into includes/features.fieldgroup.inc: