Problem/Motivation

Project Release has a Drupal 6 dependency: The code requires the name of the term reference field for the API vocabulary to be named

'taxonomy_' . $api_vocabulary->machine_name

The only way to create a field that follows this pattern is to upgrade from Drupal 6, see taxonomy_update_7004(). A Drupal 7 term reference field will have the field_ prefix, and can have an arbitrary name.

To reproduce:

  • Install a new Drupal 7 site
  • enable project_release
  • create a vocab for API version, with some terms like "7.x", "8.x"
  • drush vset project_release_api_vocabulary N #, where N is the vid of your vocabulary created above
  • Create a project node and release node
  • call project_release_find_latest_releases($nid, $tid, NULL). You'll see the error PHP Fatal: EntityFieldQueryException: Unknown field: taxonomy_version.

Proposed resolution

??

Remaining tasks

??

User interface changes

N/A

API changes

???

Comments

dww’s picture

'taxonomy_' is fine for taxonomy.module provided fields. 'field_*' is supposed to be the namespace for field.module fields. But taxonomy creates its own fields and instances for its vocabs.

My guess is that you're hitting this on a local dev site where all the terrible project_release taxonomy stuff hasn't been properly configured yet. It's all a mess.

But, for example, what does 'drush vget project_release_api_vocabulary' get you? I'm guessing it's empty. There might not even *be* an api compatibility vocab on your site.

grendzy’s picture

I do have a release taxonomy configured. dww found the culprit: update.php creates "taxonomy_[NAME]" fields in taxonomy_update_7004(). So I think the only way to have one of these fields is to update from Drupal 6.

Maybe we need a variable to store the field name in addition to the vocab id?

dww’s picture

Issue tags: -project, -drupal.org D7 +7.x-2.0 blocker

I hate to do this, but based on a conference call where we're trying to estimate all the remaining tasks for the d.o D7 launch, we're untagging this one since technically the code as written is going to work for the d.o case. :/ So, instead tagging this as something we should fix before we ship an official 7.x-2.0 release, but it's not blocking d.o D7 anymore.

grendzy’s picture

Title: PHP Fatal: EntityFieldQueryException: Unknown field: taxonomy_version » Project Release 7.x has Drupal 6 dependency: PHP Fatal: EntityFieldQueryException: Unknown field: taxonomy_version

That makes sense. I'll clarify the issue summary.

grendzy’s picture

Issue summary: View changes

clarify fieldCondition

grendzy’s picture

Issue summary: View changes

apply summary template