I was perplexed that a CCK node type didn't show up under "Edit components->Content types:node" at the page
/admin/structure/features/create
I think it may be because the node type had an entity field that referred to that same node type and it is getting
caught up by features.admin.inc line 105 where it does the unset
if ($options) {
// Find all default components that are not provided by this feature and
// strip them out of the possible options.
if ($map = features_get_default_map($component)) {
foreach ($map as $k => $v) {
if (isset($options[$k]) && (!isset($feature->name) || $v !== $feature->name)) {
unset($options[$k]);
}
}
}
...
since the node of type X has an entity reference also to nodes of type X it gets deleted from $options
To replicate
1. Create CCK node type
2. create Entity Reference (select list)
3. Have entity reference be of target type=Node
4. Go to /admin/structure/features/create
5. Select Edit components = "Content types: node"
Find CCK node type is not listed. Fields for that node type are not listed.
---------------
If I comment out the "unset" function then I get back the list of all CCK content types and all fields for that node type
Comments
Comment #1
rar CreditAttribution: rar commentedComment #2
rar CreditAttribution: rar commentedUpdate: While I can now get a list of those nodes by commenting out the unset() in features.admin.inc, the export is still blank, so this would need to be fixed in (I'm guessing) features.export.inc as well.
Comment #3
rar CreditAttribution: rar commentedAny updates on this?
This seems to be a major issue in that if there is a node entity reference in a node content type then we can't use features to export into code for tracking in an RCS. It's a huge interrupt in trying to have good change management processes.
Comment #4
mpotter CreditAttribution: mpotter commentedClosed due to inactivity. Reopen if it's still an issue in the latest version along with exact steps to reproduce it. This issue refers to CCK which was a Drupal 6 term, so not even sure if this still applies to Drupal 7.
Also, do not mark your issues as Major just to get attention.
Comment #5
denix CreditAttribution: denix commentedUnfortunately it does applies to Drupal 7, I have a long list of content types, almost all of them using entity reference field types and all of them do not appear in the "create" page. I did not dig into the code, but it can easily be replicated.
Comment #6
anup.singh CreditAttribution: anup.singh as a volunteer and at Faichi Solutions Pvt Ltd for Faichi Solutions Pvt Ltd commentedDenix, I have tried reproducing the issue in latest version of feature and its not reproducible.
Possible reason for content type not appearing in list is because it is already used in some other enabled feature. So to avoid conflict module removes particular entity from the list.
Even after this if you are able to reproduce this issue in fresh copy of Drupal and feature then please reopen this issue with valid steps to reproduce.
Thanks