Looking at the issue "Port project_release to D7" it seems like Project Release should be working. Right?

But when I go to node/add/project-release I get the following error on a full Error page:

Error
Error message

EntityFieldQueryException: Unknown field: field_project_has_releases in EntityFieldQuery->addFieldCondition() (line 770 of /path-to-drupal/includes/entity.inc).

The website encountered an unexpected error. Please try again later.

Any ideas on this? I am using the most current version of Project 7.x-2.x-dev (upgraded about an hour ago).

Thanks!

Comments

thermador’s picture

No ideas eh?

I am using the latest -dev of:
Project
Project Issue
Entity

I am using this on a production site by the way. There are features of Drupal 7 that I need for the site that Drupal 6 just doesn't offer. Project and Project Issue 7.x are functional enough for production, in my opinion, but I have been waiting forever for the releases part to get ported to D7.

Is this a bug everyone else is having, or is it just me? That is, is it even possible to use Project Releases right now, or is that just a faulty line of reasoning?

Or do I just need to manually create the field "field_project_has_releases" ?

I wish I had the skills to debug this myself, sorry. :-(

adamtong’s picture

I also have this issue. I got this error in fresh install.

Thanks.

sjk07’s picture

This issue is also affecting my site.

drumm’s picture

You should not need to manually create field_project_has_releases, but it is a good way to recover. The field definition can be found in release/includes/project_release_node_type.inc. Note this is a field on project nodes, not releases.

The problem is that the field definition has 'bundle' => 'project' hard-coded. It should match the pattern that field_issue_version uses in project_release_node_type_update(). Except, iterate over project_project_node_types() instead of project_issue_issue_node_types().

Robytfc’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.6 KB

First patch submission so apologise if anything is wrong but this should fix the problem.

Status: Needs review » Needs work

Robytfc’s picture

Status: Needs work » Needs review
StatusFileSize
new1.85 KB

Going to try again.

drumm’s picture

Status: Needs review » Needs work

Looks like good progress. A couple things to improve:

  • The indentation should match the surrounding code, and https://drupal.org/coding-standards.
  • This code should actually move to project_release_node_type_update(), so it can act on both release node types and project node types being updated at any time.