Please update the "Converting 6.x modules to 7.x" guide (http://drupal.org/update/modules/6/7) to include the fact that taxonomy synonyms have now been removed from core, in patch submitted by catch in http://drupal.org/node/567572

Thanks

Comments

Island Usurper’s picture

It should also be noted that one of the database tables that had its name changed now doesn't exist since taxonomy terms are fields. Instead of changing {vocabulary_node_types} to {taxonomy_vocabulary_node_type}, module developers need to use the Field API to determine which bundles have taxonomy term instances.

jhodgdon’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Outdated » taxonomy.module
Category: task » bug
Issue tags: +Needs documentation

This should be in the core doc queue. Although it's a handbook page, we monitor the upgrade module/theme guides there.

jhodgdon’s picture

Status: Active » Fixed

I've added this to the upgrade page. http://drupal.org/update/modules/6/7#no-synonyms-taxonomy

It sure looks half-thought-out to me, though. There's not a clear way to replace the functionality or upgrade to D7, as far as I can tell? Anyway, at least it is in the guide...

tanoshimi’s picture

Thanks for updating. As you say, for getting equivalent functionality in D7, you would have to add a field to the taxonomy terms in a vocabulary, something like this:

  $field = array(
    'field_name' => 'synonyms_synonym', // The unique machine name used to refer to this field
    'type' => 'text', // Each synonym will be a text string
    'cardinality' => FIELD_CARDINALITY_UNLIMITED, // Allow an unlimited number of synonyms per term
  );
  field_create_field($field);

  $instance = array(
    'field_name' => 'synonyms_synonym', // The field we just created
    'object_type' => 'taxonomy_term',  // The type of node to bind this field to
    'bundle' => 'tags',     // The name of the vocabulary
    'label' => t('Synonyms for this term'),
    'weight' => 0,
    'widget' => array(
      'type' => 'text_textfield',
      'label' => t('Some text'), // Don't know when this gets displayed
    ),
  );
  field_create_instance($instance); 

That doesn't answer the question of an upgrade path from D6 though - I've got two sites that make fairly extensive use of synonyms, and I'm not sure how I'm going to get them from term_synonym table to field API....

jhodgdon’s picture

Please go comment on #567572: Remove taxonomy synonyms since Field API is better and open it back up if you are concerned.

They apparently plan to leave it to a contributed module (!!!!) to do the upgrading, although this was a core feature -- see http://drupal.org/node/567572#comment-2652960 and the comment after that where the issue was marked back to closed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

matslats’s picture

There's an error in the above snippet
'object_type' => 'taxonomy_term', // The type of node to bind this field to
should be
'entity_type' => 'taxonomy_term', // The type of node to bind this field to

Upgrade is provided by the synonyms module