Closed ManonGros closed 10 months ago
I can reproduce this. I get this error message in the console
[Error] TypeError: null is not an object (evaluating 'findReact(schemeSelect).setScheme')
onComplete (occurrence:251)
[Error] TypeError: Right side of assignment cannot be destructured — swagger-ui-bundle.js:7:18814
(anonymous function) (swagger-ui-bundle.js:7:19978)
[Error] Unhandled Promise Rejection: TypeError: Right side of assignment cannot be destructured
(anonymous function) (swagger-ui-bundle.js:7:18814)
[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'n.resultMap')
(anonymous function) (swagger-ui-bundle.js:7:20010)
So this in the occurrence file
onComplete: function() {
var schemeSelect = document.querySelector('.scheme-container select');
findReact(schemeSelect).setScheme('https');
},
Do you know how to fix it?
The code is very similar to what you wrote for the site originally, but I moved it here: https://github.com/gbif/tech-docs-theme/blob/main/src/partials/swagger-ui.hbs
The Jenkins build for tech-docs-theme triggers a build for tech-docs.
I have no recollection of writing that. The 3-4 demos I made was no doubt just copy-pasted from the documentation/tutorial.
This is marked as relevant to the launch, but I would not know how to fix. @MattBlissett, @MortenHofft, @ManonGros: how serious is this, would it be a blocking issue, and is it still the case (not a Safari user here)?
I would love if it could be fixed (I am sure I am not the only safari user out there) but it might not be a blocking issue?
It is in the milestone as a launch issue, and assuming it still doesn't work in Safari that's a blocking issue.
Maybe try this:
onComplete: function() {
var schemeSelect = document.querySelector('.scheme-container select');
var selector = findReact(schemeSelect);
if(selector){
selector.setScheme('https');
}
},
Feedback on Occurrence API (Github source for this page)
I have been trying to check the content of this https://tech-docs.gbif-uat.org/en/openapi/v1/occurrence#/Searching%20occurrences/searchOccurrence but I get a loading icon forever and no content. When I try it in Chrome, it works instantaneously.