UofS-Pulse-Binfo / analyzedphenotypes

Tripal/Drupal support for analyzed phenotypic data including data loaders, exporters, trait pages and summaries on germplasm pages.
GNU General Public License v2.0
0 stars 1 forks source link

hp__phenotypic_variability breaks project entity #91

Closed bradfordcondon closed 5 years ago

bradfordcondon commented 5 years ago

I was unable to edit entities due to a field looking for an organism_id column in project. Removing the hp__phenotypic_variability field resolves the issue.


PDOException: SQLSTATE[42703]: Undefined column: 7 ERROR: column "organism_id" of relation "project" does not exist LINE 1: ...nflower project for test loading genotypes. k', organism_i... ^: UPDATE chado.project SET name = :name, description = :description, organism_id = NULL, project_id = :project_id WHERE project_id = :old_project_id ; Array ( [:name] => Test Sunflower Genotype Project [:description] => Sunflower project for test loading genotypes. k [:project_id] => 2 [:old_project_id] => 2 ) in chado_query() (line 1790 of /var/www/html/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc).

Does the field require an organism_id column on project? If so it should please add it to the schema if not present.

edit- i dont actually see where this might be occurring in the field...

laceysanderson commented 5 years ago

This is an old bug that was fixed. We used the Fields Generator to create our fields and it sets the chado column to organism_id by default. If you forget to change it you get this bug because the ChadoField is trying to look up the organism even though there isn't one in that field. It has been fixed here which shows it's no longer set to organism_id.

To fix it in your instance:

  1. Delete the field (you may have to delete all instances)
  2. Update your module to the newest dev release
  3. Re-check for new fields so that it grabs the new instance definition.
bradfordcondon commented 5 years ago

We used the Fields Generator to create our fields and it sets the chado column to organism_id by default.

That was definitely what i expected as I've done the same thing myself. Updating did resolve. Sorry for posting a stale issue, thank you!

laceysanderson commented 5 years ago

No worries, I'm glad it works now!