Having trouble with kind of a weird edge case. I have a feature that provides a node type and fields, as well as some custom code in the .module file. I really want to have the node_type "base" be my module(feature) so I can use hook_save, hook_form, etc. I changed the base manually from node_content to my module name, but when I go to recreate the feature, it doesn't want to export the node type. I've tracked this down to a check in features.node.inc to limit the node_type's owner to either node_content or features. So my feature request is to allow the module(feature) itself to be the owner, as I have done in the following patch.
I know this is an edge case, but it's one I've hit twice now.
Comment | File | Size | Author |
---|---|---|---|
features-export-own-node-type.patch | 682 bytes | rbayliss | |
Comments
Comment #1
tche082 CreditAttribution: tche082 commentedi got the same issue. subscribing.
Comment #2
febbraro CreditAttribution: febbraro commentedSeems reasonable
Comment #3
febbraro CreditAttribution: febbraro commentedComment #4
alberto56 CreditAttribution: alberto56 commentedPossibly related: The base type of my node type is "uc_product" for use with Ubercart. I changed it by hand in my features.inc file. I'm expecting Features to keep the base of my node type. Instead, Features deletes the entire node type when recreating the feature.
Comment #5
geaseThis patch makes no sense, imho. I faced the same problem, and all you should do is to move implementation of hook_node_info from {name}.features.inc to {name}.module file. It won't be ovewritten by features then. You can edit it and revert the feature.
Comment #6
drzraf CreditAttribution: drzraf commentedand what about:
* you have many stuff on website 1 provided by one feature
* you want a subset of this (let's say only on node:type) on website 2
=> you'd need such patch (but AFAICT this one won't apply anymore)
Comment #7
drzraf CreditAttribution: drzraf commentedhere is something which does not work...
Comment #8
Dean Reilly CreditAttribution: Dean Reilly commented@gease I don't think your suggestion would work as features doesn't seem to check what file the hook appears in - it just checks whether it is present or not.