Describe the bug
When the App Config disableQueryPOSTs option is false, queries are sent using POST instead of GET. Using POST requests somehow results in profile pages displaying incorrect results (no datasets in the cases I've found so far). When query requests are sent with GET instead (i.e. disableQueryPOSTs is true), then different (and presumably correct) results are shown.
Go to the profile for a person who is part of a lot of groups (~10 or more) and has contributed to at least one dataset, e.g. Matt's http://localhost:3000/profile/http://orcid.org/0000-0003-0077-4738. See a list of datasets for that person.
In the config file, set disableQueryPOSTs to false
Go back to the same profile as in step number 2, see that no datasets are listed.
In Production:
At the time of writing, search.dataone.org disables query POSTs, but KNB & ADC do not. So you can currently see this behaviour by navigating to the same profile on search.dataone.org and comparing it to the profile on the ADC or KNB. For example, see Matt's profile on DataONE vs Matt's profile on KNB.
Expected behavior
Correct results should be displayed whether the query is done using GET or POST
Additional context
Found while investigating #2042. The POST queries were implemented in #392. We should fix this before implementing #1998
Describe the bug When the App Config
disableQueryPOSTs
option isfalse
, queries are sent using POST instead of GET. Using POST requests somehow results in profile pages displaying incorrect results (no datasets in the cases I've found so far). When query requests are sent with GET instead (i.e.disableQueryPOSTs
istrue
), then different (and presumably correct) results are shown.Example 1: Jeanette's profile on the ADC
Case 1A:
disableQueryPOSTs:false
Case 1B:
disableQueryPOSTs:true
Example 2: Matt's profile on the KNB
Case 2A:
disableQueryPOSTs:false
Case 2B:
disableQueryPOSTs:true
The bug does not occur on profiles for people who aren't part of a lot of groups (e.g. Jasmine's profile http://localhost:3000/profile/http://orcid.org/0000-0001-8888-547X). This is because for shorter queries, MetacatUI always uses GET.
To Reproduce Steps to reproduce the behavior:
Running MetacatUI locally:
disableQueryPOSTs
totrue
http://localhost:3000/profile/http://orcid.org/0000-0003-0077-4738
. See a list of datasets for that person.disableQueryPOSTs
tofalse
In Production:
At the time of writing, search.dataone.org disables query POSTs, but KNB & ADC do not. So you can currently see this behaviour by navigating to the same profile on search.dataone.org and comparing it to the profile on the ADC or KNB. For example, see Matt's profile on DataONE vs Matt's profile on KNB.
Expected behavior Correct results should be displayed whether the query is done using GET or POST
Additional context Found while investigating #2042. The POST queries were implemented in #392. We should fix this before implementing #1998