-
Notifications
You must be signed in to change notification settings - Fork 36
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
{Tree}treedefitem matching query does not exist
error when running a query with an invalid mapping
#3340
Comments
This bug is caused by an invalid item in this query: https://nhmdtest030823-v7810-prerelease.test.specifysystems.org/specify/query/405/ user: If we reduce the query to just the not mapped item, the query looks like this: {
"id": 405,
"contextname": "CollectionObject",
"contexttableid": 1,
"countonly": false,
"formatauditrecids": false,
"isfavorite": true,
"name": "Not Mapped Query",
"ordinal": 32767,
"remarks": null,
"searchsynonymy": false,
"selectdistinct": false,
"smushed": false,
"sqlstr": null,
"timestampcreated": "2023-04-14T13:46:52",
"timestampmodified": "2023-04-14T13:46:52",
"version": 0,
"createdbyagent": "/api/specify/agent/2706/",
"modifiedbyagent": null,
"specifyuser": "/api/specify/specifyuser/1/",
"reports": "/api/specify/spreport/?query=405",
"resource_uri": "/api/specify/spquery/405/",
"fields": [
{
"id": 4727,
"allownulls": null,
"alwaysfilter": null,
"columnalias": null,
"contexttableident": null,
"endvalue": null,
"fieldname": "Division",
"formatname": null,
"isdisplay": true,
"isnot": false,
"isprompt": null,
"isrelfld": false,
"operend": null,
"operstart": 11,
"position": 0,
"sorttype": 0,
"startvalue": "",
"stringid": "1,9-determinations,4-preferredTaxon.taxon.Division",
"tablelist": "1,9-determinations,4-preferredTaxon",
"timestampcreated": "2023-04-14T13:46:52",
"timestampmodified": "2023-04-14T13:46:52",
"version": 0,
"createdbyagent": "/api/specify/agent/2706/",
"modifiedbyagent": null,
"query": "/api/specify/spquery/405/",
"mappings": "/api/specify/spexportschemaitemmapping/?queryfield=4727",
"resource_uri": "/api/specify/spqueryfield/4727/"
}
]
} It would be very nice if the query builder did not fail and instead registered the mapping as invalid. This is not an uncommon issue and I imagine this has manifested in other issues that already exist. |
{Tree}treedefitem matching query does not exist
error when running a query with an invalid mapping
It seems that Specify 7 is using Phylum and not Division where in Botany collections it should. Mappings made in 6 expect Division, and mappings made in 7 expect Phylum (which is wrong when working with botany). Made in 7 (stringid": "1,9-determinations,4-preferredTaxon.taxon.Phylum",) {
"id": 4746,
"allownulls": null,
"alwaysfilter": null,
"columnalias": null,
"contexttableident": null,
"endvalue": null,
"fieldname": "Phylum",
"formatname": null,
"isdisplay": true,
"isnot": false,
"isprompt": null,
"isrelfld": false,
"operend": null,
"operstart": 8,
"position": 1,
"sorttype": 0,
"startvalue": "",
"stringid": "1,9-determinations,4-preferredTaxon.taxon.Phylum",
"tablelist": "1,9-determinations,4-preferredTaxon",
"timestampcreated": "2023-04-14T16:07:46",
"timestampmodified": "2023-04-14T16:07:46",
"version": 0,
"createdbyagent": "/api/specify/agent/2706/",
"modifiedbyagent": null,
"query": "/api/specify/spquery/405/",
"mappings": "/api/specify/spexportschemaitemmapping/?queryfield=4746",
"resource_uri": "/api/specify/spqueryfield/4746/"
} Made in 6 (stringid": "1,9-determinations,4-preferredTaxon.taxon.Division"): {
"id": 4745,
"allownulls": null,
"alwaysfilter": null,
"columnalias": null,
"contexttableident": null,
"endvalue": null,
"fieldname": "Division",
"formatname": null,
"isdisplay": true,
"isnot": false,
"isprompt": null,
"isrelfld": false,
"operend": null,
"operstart": 11,
"position": 0,
"sorttype": 0,
"startvalue": "",
"stringid": "1,9-determinations,4-preferredTaxon.taxon.Division",
"tablelist": "1,9-determinations,4-preferredTaxon",
"timestampcreated": "2023-04-14T16:07:46",
"timestampmodified": "2023-04-14T16:07:46",
"version": 0,
"createdbyagent": "/api/specify/agent/2706/",
"modifiedbyagent": null,
"query": "/api/specify/spquery/405/",
"mappings": "/api/specify/spexportschemaitemmapping/?queryfield=4745",
"resource_uri": "/api/specify/spqueryfield/4745/"
}, |
Can recreate in edge (7.9.6) |
From #3311
The behavior mentioned in that comment seems to be the exact same as this issue so that is why I closed it lX3LdmGQJG.mp4 |
Describe the bug
I assume this error is also caused by an unmapped field. However, after further analysis. The cause is the same but the message differs.
#3311 has "message":"Error: Tried to get unknown field
This has two stacked errors with the same message.
DoesNotExist at /stored_query/ephemeral/ Taxontreedefitem matching query does not exist
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Something more informative than an Error Alert Dialogue
Screen Recording and Crash Reports
Specify 7 Crash Report - 2023-04-12T21_24_09.575Z.txt
Specify 7 Crash Report - 2023-04-12T21_24_12.125Z.txt
SCR.SMAl.mp4
Desktop:
OS: Mac OSx Ventura
Browser: Chrome
Specify 7 Version: 7.8.10-prerelease
Database Name: NHMD Test
Reported By
Carlos @carlosmbe
The text was updated successfully, but these errors were encountered: