#789556: Support taxonomy vocabularies seems to have introduced a recursion in 1.0-beta4, when trying to update an existing feature containing a taxonomy term reference field:
Fatal error: Maximum function nesting level of '100' reached, aborting! in /www/flow/htdocs/modules/field/field.info.inc on line 616
Call Stack:
0.0007 389212 1. {main}() /www/flow/tools/drush/drush.php:0
0.0191 2305640 2. drush_main() /www/flow/tools/drush/drush.php:41
4.1256 59409932 3. drush_dispatch() /www/flow/tools/drush/drush.php:101
4.1257 59410424 4. call_user_func_array() /www/flow/tools/drush/includes/command.inc:214
4.1257 59410676 5. drush_command() /www/flow/tools/drush/includes/command.inc:214
4.1260 59413956 6. _drush_invoke_args() /www/flow/tools/drush/includes/command.inc:806
4.1312 59445824 7. call_user_func_array() /www/flow/tools/drush/includes/command.inc:134
4.1312 59446088 8. drush_features_update() /www/flow/tools/drush/includes/command.inc:134
8.6543 80061688 9. _drush_features_export() /www/flow/htdocs/sites/all/modules/contrib/features/features.drush.inc:202
25.6361 108128452 10. features_populate() /www/flow/htdocs/sites/all/modules/contrib/features/features.drush.inc:278
25.6361 108131952 11. _features_populate() /www/flow/htdocs/sites/all/modules/contrib/features/features.export.inc:15
[...snip...]
25.7062 108331684 95. _features_populate() /www/flow/htdocs/sites/all/modules/contrib/features/features.export.inc:54
25.7068 108333164 96. drupal_alter() /www/flow/htdocs/sites/all/modules/contrib/features/features.export.inc:51
25.7068 108334088 97. field_collection_features_pipe_field_alter() /www/flow/htdocs/includes/module.inc:1004
25.7069 108334636 98. features_field_load() /www/flow/htdocs/sites/all/modules/contrib/field_collection/field_collection.module:1042
25.7069 108334912 99. field_info_field() /www/flow/htdocs/sites/all/modules/contrib/features/includes/features.field.inc:192
It seems that the vocabulary is added to the pipe by the taxonomy reference field in field_features_export(), and the subsequent call to taxonomy_features_export() adds the field back to the pipe...
Since the mapping for components isn't updated between entering recursion, _features_populate() doesn't recognize whether it has already processed a component or not.
Comments
Comment #1
smk-ka commentedThis patch implements a static cache of already processed component items to filter out any known items before entering recursion.
Comment #2
fangel commentedI'm fairly sure this is a regression - I had a feature with a term with a term-ref field, which worked just fine in -beta2.
But that patch works very well. The problem went away after applying.
However I think that perhaps a better way to do it, would be to avoid adding the fields in
taxonomy_features_exportif the field already exists in$export['features']['field']-M
Comment #3
febbraro commentedAdding tag
Comment #4
jief commentedRerol patch #1 for last 7.x-1.x-dev
Comment #5
tim.plunkett$c and $d are terribly obfuscated variable names. Can they be a *bit* more verbose?
Comment #6
mpotter commentedHere is an updated patch that improves the variable names.
Comment #7
markisatacomputer commentedI'm using 7.x-1.x-beta4 and patch in comment 1 works for me
Comment #8
drupalexio commentedI'm using 7.x-1.0-beta6 and the patch in comment #6 works great for me.
Comment #9
mpotter commentedCommitted to 7.x-1.0-dev
Comment #10
mpotter commentedComment #11
mpotter commentedRemoving v7 blocker tag
Comment #12
pwaterz commentedpatch worked for me
Comment #13
hefox commentedComment #14
pwaterz commentedFyi this patch also works on 7
Comment #15
hefox commentedIt's been commited to 7.x and should be in the dev version of it.