Terms and vocabularies have a problem equivalent to #935726: Feature conflict: unnecessary nodes, node types, terms, vocabularies, and files, in that each feature which exports a node will include every necessary term and vocabulary, even if these have already been defined in another feature, leading to conflicts unless the user chooses to place all terms, vocabularies, and nodes into a single feature. It is necessary to call features_get_default_map('uuid_vocabulary') in uuid_vocabulary_features_export() to check which vocabularies are already defined, and likewise for terms.

However, this raises a larger problem. uuid_vocabulary_features_export_render() and uuid_term_features_export_render() currently generate hook_uuid_features_default_vocabularies() functions which return arrays that are not explicitly indexed, leaving PHP to assign numeric array indices starting with zero. As a result, features_get_default_map() does not include terms or vocabularies in the mapping of Drupal data to exported feature, because line 702 of features/features.export.inc checks is_numeric() before putting something into the map (so that the array can be searched later on).

This patch fixes both problems.

Comments

mvc’s picture

Status: Active » Needs review
StatusFileSize
new4.22 KB
mvc’s picture

Status: Needs review » Closed (duplicate)

hmm, on second thought, this problem is also true of uuid_node and uuid_file. i'll submit a patch to #935726: Feature conflict: unnecessary nodes, node types, terms, vocabularies, and files which resolves all of this.