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

[BUG] api.taxonomy.taxasuggest.js assumes that if portal/* is a valid link that this is the CLIENT_ROOT url #2063

Open
mickley opened this issue Jan 14, 2025 · 0 comments
Assignees
Labels

Comments

@mickley
Copy link
Collaborator

mickley commented Jan 14, 2025

See code here:

if(urlExists("/portal"+acUrlBase)) acUrl = "/portal"+acUrlBase;

The problem with this line is that if a separate Symbiota installation is set up under /portal, then it will use that, even if it's not the correct installation. I'd recommend removing it as the following lines make it redundant anyway.

There may be better ways to get CLIENT_ROOT as well without having to try a bunch of HTML requests to see if a URL exists: e.g., having it set via PHP writing it out to javascript, or playing with thisScript.src and window.location variables to figure out where the call is coming from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Organize
Development

No branches or pull requests

3 participants