Stay within your iNat Network Affiliation domain when clicking links to other iNat Network sites

The easiest way to link to other iNaturalist resources (observations, taxa, etc) is to just paste in the full URL. This causes issues with affiliate sites (of particular interest to me now that https://inaturalist.ala.org.au/ is online). The solution is to manually create relative HTML URL’s, which is a bit cumbersome.

Ideally it would be good to automatically recognize either partial links (this would not be retrospective) or to adjust full URL’s to partial/relative ones. I assume the current conversion to URL happens at time of submitting the text. Having links dynamically adjusted would obviously work differently (and create more server load) so I don’t know if its reasonable. Additionally, most people only use the one gateway and don’t really care about such issues.

Can you provide a concrete example of what you’d like to see? I think the request is to automatically recognize either partial links (this would not be retrospective) or to adjust full URL’s to partial/relative ones, but in what context? You refer to submitting the text, but it’s unclear to me what the text is, and what is being submitted.

1 Like

If someone puts in an iNaturalist link text it will automatically be reformatted to a relative link.

https://www.inaturalist.org/observations/33359619
<a href="/observations/33359619">/observations/33359619</a>

https://inaturalist.ala.org.au/taxa/924041
<a href="/taxa/924041">/taxa/924041</a>

This could be done at the time of submission (as is currently done with automatically detecting hyperlinks) but could also be done retrospectively every time the text is displayed (i.e. it would need to be parsed before being displayed). The latter (retrospective) version would create more server load however and might break some rare examples where someone is specifically referring to an affiliated site. [Or a script could be run to convert all absolute links to relative ones in one go.] [This is only for iNat affiliated sites of course.]

The partial links thing was just that if you typed /observations/33359619 it would convert that to a hyperlink but that is not really necessary as its easier to copy the whole link.

Does that clarify things?

3 Likes

Thanks, that’s helpful. Is the text you’re referring to observation descriptions and comments?

I can understand wanting consistency and to keep users within the domain they started on, but the idea of automatically changing people’s submissions makes me nervous. The only change we make now is to add hyperlinks in cases where part of the text looks like a URL but is not already hyperlinked with HTML tags, and we simply add a hyperlink using the existing text. This is done dynamically when the web page is loaded.

To change the domain of the URL would be to make an assumption about what the user intended to link to (are they linking to the record, or to the presentation of the record in a specific domain). Personally, I’d be more comfortable with a custom scheme for such “links to records within the current domain”, sort of like how mentions are handled. But that’s just my opinion. Thanks for the clarity on the request.

3 Likes

I suppose one could try polling for this information, but my strong guess is that nearly 100% of such links are intended for the record itself, not the portal-specific presentation thereof.

For the few cases where the presentation is the focus, maybe that could be assumed/expected when the user provides an actual HTML hyperlink instead of just a text URL, and their HTML would be left untouched.

8 Likes

If this were to be implemented, personally I would want to see it happen anywhere that text URLs are interpreted as hyperlinks. For example, if I am doing some collaborative curating with another curator in a different domain, I would want them to be able to follow my URLs to flags, taxa, taxon changes, taxon framework relationships, etc., without them getting logged out of their domain, and without my having to manually supply HTML relative hyperlinks.

8 Likes

we have the same issue from the iNaturalist.nz portal, getting logged out when following links/urls to observations on the iNaturalist.org domain. Ideally it would pick up the domain from the users preferences?

7 Likes

Exactly - since it is already generating hyperlinks dynamically from things that look like URL’s I think it could quite easily be modified to find any of the affiliated sites in the URL and convert them to partial/relative hyperlinks. This obviously wouldn’t affect people who have manually added html links in the text.

8 Likes

Personally I use https://inaturalist.ala.org.au/
Somebody will link something, an observation, a project, etc. to me.
I go to it and try to comment, id, join the project, etc, but I can’t. I then have to log in again because it’s a direct inaturalist.org link, or I have to modify the link to be an iNat au link; which is a right pain.
I think Reiner’s solution would fix this and allow me to focus on my work in helping people rather than tripping over clumsy tech.
Cheers

5 Likes

I also use https://inaturalist.ala.or.au/
Even to get to this forum logs me out of this directly into inaturalist.org
Very annoying.
Thanks.

The reason I don’t use iNatAU…

3 Likes

It should be done to regular .org too, there’re constant links to .ca or .au, ould be much easier to havethem automatically changed. Plus language settings should stay too.

1 Like

I posted this and was redirected here:

Automatic logging in when moving between domains (communities)

Users in other communities often post links with community specific urls (e.g. https://inaturalist.ala.org.au/observations/95890153).
When arriving at the observation and making a comment or ID, one is confronted with having to log in before one can make any contributions.
This is not an issue with the occasional observation (click sign in, sign in, and you are returned to the page), but when one is making identifications and has opened 10-20 tabs, it is very frustrating.

Why can moving between domains/community not just automatically keep one logged in?
Alternatively, if one is entering a different domain, why not open the observation in the user’s domain/community, rather than the one given on the url?


So I guess this is the same, but giving a different programming route: instead of staying within the user’s domain, just giving users automatic open access to all domains.
Would that not achieve the same thing?

2 Likes

Automatically logging in to all domains is not possible as the login is controlled via a cookie in the browser on the client side that by definition is restricted to a particular domain. i.e. The login is remembered on the client side and not the server side.

2 Likes

Have you considered using a client-side solution like the Requestly browser extension for Google Chrome? I just tested this with a rule to match inaturalist.ca in the host and replace it with inaturalist.org, and it works. It may not be an ideal solution, but it’s better than nothing.

In our iNaturalist Discord community, people often cut-and-paste observation URLs from their own affiliate sites into chat channels, and then I have the same problem: I have to either manually change the URL, or else login to their site in order to interact with the observation. This use case is similar, but wouldn’t be addressed by this feature request. The Requestly extension, however, handles both cases.

Ultimately, for myself, I decided that it caused the least hassle when sharing my stuff to just switch my affiliation from .ca to .org and it has remained that way ever since.

2 Likes

Since I’m slightly uncomfortable promoting this solution without first explaining the risks you assume by using it, I present it now with this caveat:

Caveat: Although I am satisfied for my own use that my rule is correct, you should be perfectly comfortable with what the extension does, and that my rule is OK before deciding to use it. Understand that this extension is capable of modifying your browser behaviour in ways that could lead it to behave in a completely different way than you expected.

With that out of the way …

After a bit of tweaking to handle more than just inaturalist.ca, here’s my Requestly rule that should work for all the affiliate domains I know of so far:

https://app.requestly.io/rules/#sharedList/1641385167215-inaturalist

It’s based on the code I maintain for our Discord bot here:

https://github.com/dronefly-garden/dronefly/blob/main/inatcog/core/parsers/url.py

I update the code every time a new affiliate domain is announced on the iNat blog. I’ll try to remember to update the shared Requestly rule, too, so long as it continues to work for me.

1 Like

And the other way around: someone will post in the forums, with a link to an observation on iNaturalist Canada, and in order to interact with it, I have to get to the same observation in the regular iNaturalist site.

What purpose is served by having separate domains?

4 Likes

The benefit of separate domains is that I think it limits the search data when doing research. But yes, apart from that there doesn’t seem to be any benefit.

1 Like

The data is the same regardless of domain. The only difference I am aware of is general messages on the home page and footer. A user’s affiliation has some data access aspects I believe. Links in the forum are different as it’s a separate service from iNaturalist.

2 Likes

By the way, since I was pinged in another thread about this recently, that reminded me I hadn’t kept my commitment to update the Requestly rule when new partner sites are added. I have just updated it to include iNat Chile and iNat Taiwan, so I believe as of today it’s current with all partner sites.

4 Likes