Taxonomy vocabularies are not supported by uuid.
Strange...

Deploying a vocabulary failed hard becaused of this. Will see if I can handle this...

CommentFileSizeAuthor
#1 taconomy_voc_uuid.patch778 bytesaspilicious

Comments

aspilicious’s picture

Status: Active » Needs review
StatusFileSize
new778 bytes

I think this is al we need (it works on my side)

dixon_’s picture

The reason why I've intentionally left this out, is because vocabularies has a machine name which Features is using to export vocabularies. I consider vocabularies to be configuration because of that, and recommend using Features instead.

Basically, roles, vocabularies input formats etc, that all have machine names, should not have UUID I think.

aspilicious’s picture

Well what If I don't want to install features to transport my taxonomy vocabularies and terms.
So I need to install features, transport the vocabulary and than deploy the terms.
It's a bit confusing as terms work with deploy and vocabularies don't...

Hmm not sure if I approve the feature approach for this...

skwashd’s picture

Status: Needs review » Closed (won't fix)

The machine name discussion was had a long time ago. Although at the time I was in favour having roles and other things (not just entities) having UUIDs, I now see the benefits of dixon_'s approach and support it. Marking this wonfix.

aspilicious’s picture

Status: Closed (won't fix) » Active

I want to have an answer first of dixon before closing this agian, when it's closed it's hard to track this issue. Taxonomy vocabs are special because they ARE entities but have a machine name at the same time. Not supporting taxonomy vocabularies is confusing as you expect entities to have a UUID column. (from a developer perspective).

I can live with a non fix but I would like to have more background information why it's bad to support this.

Taz’s picture

I second the Entity point made in #5

ottawadeveloper’s picture

What about exposing the machine_name as a UUID? We don't need to auto-generate one, because they're already unique, but not having a registered UUID for them means we can't save/load them via entity_uuid_load (which is a bit of a pain).

In my mind, it's as simple as adding the following to uuid_get_core_entity_info():

  if (module_exists('taxonomy')) {
    $info['taxonomy_vocabulary'] = array(
      'base table' => NULL,
      'entity keys' => array(
        'uuid' => 'machine_name',
      ),
    );
  }

And then tweaking a few methods in uuid.install to recognize that an empty base table means "don't provide a UUID".

Alternatively, for people looking to get entity_uuid_load to work with vocabulary machine_names, I've just added this and it seems to work. A similar pattern can be used for other entities with machine_names that aren't supported via UUID.

function MYMODULE_entity_info_alter(&$info) {
  if (!empty($info['taxonomy_vocabulary'])) {
    $info['taxonomy_vocabulary']['uuid'] = TRUE;
    $info['taxonomy_vocabulary']['entity keys']['uuid'] = 'machine_name';
  }
}
juanjo_vlc’s picture

This is a very difficult discussion which have a lot of points of view, and machine_name works as local unique identifier, but not as universal, which is suppossed to be the base concept about this module.

And for me, as a developer, is a shame that extensions of a class, drops methods from base class, from my point of view, taxonomy_vocabulary extends entity.

I'm working on replicating contents between sites, and I prefer writting only one use case: clone entity, unaware of type.

juanjo_vlc’s picture

An update:
Vocabularies are entities, so they can have fields, this fields can be references, so we need entity_uuid_load to make them universal.

skwashd’s picture

Title: Taxonomy vocabularies are entities to » Add support UUID support taxonomy vocabularies
Issue summary: View changes
Status: Active » Closed (won't fix)

As mentioned by @dixon_ and myself above vocabularies have machine names, so they are deemed to be configuration and supported by features not UUID. Vocabs aren't fieldable either.