legumeinfo / jira-issues

placeholder repo for issues migrating from JIRA system, to be moved to their appropriate places later
0 stars 0 forks source link

Pull phylotree link from db table, remove from Drupal view #680

Closed adf-ncgr closed 6 years ago

adf-ncgr commented 6 years ago

The gene family column in the gene search result page links to the phylotree view with an absolute URL. The link is hard-coded into the Drupal View definition. The result page should be using the relative URL (/chado_phylotree) from the db record for 'LegumeInfo_gene_families'.

[LEGUME-714] created by ecannon

adf-ncgr commented 6 years ago

The table to edit is : views_display
Just pg_dump the table, delete, edit the dump and reload using \i

On peanutbase.org the url will still point to https://legumeinfo.org/chado_phylotree/[uniquename] - ie. the full url on legumeinfo ?

Or is there a plan to load data and activate /chado_phylotree on peanutbase.org ?

by moc

adf-ncgr commented 6 years ago

The file to edit to remove the link should be tripal_gene/scriptlets/gene_Drupal_view_scriptlet.txt. There is a db record which gives the URL prefix.
SELECT * FROM db WHERE name='LegumeInfo_gene_families';

The link varies between PeanutBase and LegumeInfo, relative vs absolute, so it's much safer to use db.urlprefix rather than hard-coding the URL prefix anywhere.

There are no plans for hosting Phylotree at PeanutBase. It works toward LegumeInfo's objective in providing tools for comparative research and is available for any legume database to link to. (Part of the Legume Federation mission.)

Changing a Drupal table seems quite dangerous, especially any of the Views tables.

by ecannon

adf-ncgr commented 6 years ago

note to self of view code:
https://github.com/legumeinfo/tripal_gene/blob/87f02a181eb0ca24f9bc4844208b0f7975b57c1c/views/tripal_gene.views_default.inc#L187

and:
https://github.com/legumeinfo/tripal_gene/blob/87f02a181eb0ca24f9bc4844208b0f7975b57c1c/theme/templates/tripal_gene_base.tpl.php#L10

the field config can be edited here rather than via SQL:
https://peanutbase-stage.usda.iastate.edu/admin/structure/views/nojs/config-item/gene/page/field/gene_family

by moc

adf-ncgr commented 6 years ago

I have updated the code and the DB on lis-dev, lis-stage, peanutbase-dev and peanutbase-stage

For now I have put an absolute URL in the DB on all boxes - because of how D7 forms will rewrite for "External server URL" this seems the most consistent way to resolve the issue.

by moc

adf-ncgr commented 6 years ago

Relates to: GH-687