Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.1] Resources tab no longer listing external resources #1640

Closed
themerekat opened this issue Aug 20, 2024 · 13 comments
Closed

[3.1] Resources tab no longer listing external resources #1640

themerekat opened this issue Aug 20, 2024 · 13 comments
Assignees

Comments

@themerekat
Copy link
Collaborator

image
https://lichenportal.org/portal/taxa/index.php?taxon=268369

There used to be a plethora of other resources here, like to EOL and Catalog of Life

@themerekat themerekat added the bug label Aug 20, 2024
@themerekat themerekat changed the title [3.1] Resources link on no longer listing external resources [3.1] Resources tab no longer listing external resources Aug 23, 2024
@egbot egbot added Data Issue and removed bug labels Aug 23, 2024
@egbot
Copy link
Member

egbot commented Aug 23, 2024

This is a data issue, rather than a bug. The display of custom resources is controlled by what is entered in the taxalink table. Taxa links are entered in association to a taxon node. Links can be species specific, or more general an thus linked to a higher taxonomic node (e.g. family or kingdom). When attached to a higher node, the resource is displayed for all child taxa. While there are a number of resources linked to Fungi kindgom (e.g. SELECT * FROM taxalinks WHERE tid = 51657) in the lichen portal, Albuginaceae is not listed in the Fungi kingdom, and thus these resources are not displayed for that taxon. You'll need to duplicate the desired resource links linked to the Chromista kingdom, or add a new taxon called Biota with a rankid = 1, and then link all kingdoms to this taxon, and then relink the selective resources to Biota node, and then the resource links will be available for all kingdoms. Note that this all has to be done via the backend. There is no user interface for this table, yet.

@egbot egbot assigned themerekat and unassigned egbot Aug 23, 2024
@themerekat
Copy link
Collaborator Author

@egbot , hm, how could this have happened? This happened in both the Guatemala portal and the Lichen Portal at their migration. The database never changed.

@themerekat
Copy link
Collaborator Author

Potentially also something for @GregPost-ASU to look at

@GregoryPost
Copy link
Member

https://lichenportal.org/portal-old/taxa/index.php?taxon=268369 is showing the same thing.

@themerekat
Copy link
Collaborator Author

Hmm......

@egbot
Copy link
Member

egbot commented Aug 23, 2024

This has nothing to do with the code migration. It due to new taxa being added to the portal linked to a brand new kingdom, and there are no links entered into the taxalinks table associated with that kingdom.

@themerekat
Copy link
Collaborator Author

This has nothing to do with the code migration. It due to new taxa being added to the portal linked to a brand new kingdom, and there are no links entered into the taxalinks table associated with that kingdom.

And they just never noticed before 3.1?

@egbot
Copy link
Member

egbot commented Aug 23, 2024

Same issue with plant taxa within the portal, because the resource links are only associated with Fungi.
https://lichenportal.org/portal/taxa/index.php?taxon=247248

@themerekat
Copy link
Collaborator Author

@egbot , Frank reported this same problem here, which is a fungus: https://lichenportal.org/portal/taxa/index.php?taxon=261059

@egbot
Copy link
Member

egbot commented Aug 24, 2024

@egbot , Frank reported this same problem here, which is a fungus: https://lichenportal.org/portal/taxa/index.php?taxon=261059

That is a 3.1 bug! For which I'll submit a fix for shortly.

But this still won't make links appear for taxa within Chromista and Plant. You will still have to either copy and duplicate the links in association to those kingdoms, or add a parent to the kingdoms (i.e. Biota), and then change the taxon linkages of the links to parent, which will associate them to all the kingdoms, and thus all the children of the kingdoms. You might need to check with Frank to see which option he prefers, but I think the later is the best option.

@egbot egbot added the bug label Aug 24, 2024
@egbot egbot mentioned this issue Aug 24, 2024
16 tasks
@egbot
Copy link
Member

egbot commented Aug 24, 2024

If you apply the fix within the PR I submitted, AND then run the following SQL to copy over all the Fungi links to the other kingdoms, the issue should be resolved.

INSERT INTO taxalinks(tid, url, title, owner, inherit, sortsequence)
SELECT k.tid, l.url, l.title, l.owner, l.inherit, l.sortsequence
FROM taxa t INNER JOIN taxalinks l ON t.tid = l.tid
INNER JOIN taxa k ON t.rankid = k.rankid
WHERE t.rankid = 10 AND k.tid != t.tid;

@themerekat
Copy link
Collaborator Author

If you apply the fix within the PR I submitted, AND then run the following SQL to copy over all the Fungi links to the other kingdoms, the issue should be resolved.

INSERT INTO taxalinks(tid, url, title, owner, inherit, sortsequence) SELECT k.tid, l.url, l.title, l.owner, l.inherit, l.sortsequence FROM taxa t INNER JOIN taxalinks l ON t.tid = l.tid INNER JOIN taxa k ON t.rankid = k.rankid WHERE t.rankid = 10 AND k.tid != t.tid;

Thank you!!

@themerekat
Copy link
Collaborator Author

Works! I ran the SQL query.

@github-project-automation github-project-automation bot moved this from Organize to Done in Symbiota issue triage Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants