mmisw / orr-portal

ORR Frontend component
Apache License 2.0
8 stars 5 forks source link

Hash character not encoded for self-hosted links in main list #155

Closed carueda closed 4 years ago

carueda commented 4 years ago

From https://github.com/mmisw/orr-ont/issues/73


Ok, so it's the one listed as

     https://mmisw.org/ont/~mohammedajooz/AWWM#

which, when clicked, you get

image

The trailing hash # has been "lost" because it's not being encoded (%23).

So, this is a regression as we have addressed similar issue in the past (a related entry is (https://github.com/mmisw/mmiorr/issues/213).

BTW, with proper encoding, I can see that there's an ontology registered by the IRI https://mmisw.org/ont/~mohammedajooz/AWWM#.

This is hard to see with a browser, but on the command line:

$ http -pb get 'https://mmisw.org/ont/~mohammedajooz/AWWM%23'
<?xml version="1.0"?>
...
</rdf:RDF>

<!-- Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net -->
carueda commented 4 years ago

Interesting, with running the orr-portal locally, it seems the appropriate encoding is actually in place:

image

Including correct handling when the link is clicked as expected:

image

However, the overall URL dispatch is different when in development mode because the prefix is different from the actual URL of the ORR repository and ("fully-hosted") ontologies.

So, will see what's getting in the way there.

carueda commented 4 years ago

Diagnostics: Yes, the no-hash-encoding issue only happens for "fully-hosted" (aka "self-hosted") ontologies

image

carueda commented 4 years ago

orr-portal part of the fix now in place (new version 3.9.0)

image

But there's still some back-end handling to be fixed (when the request is from a browser) as this IRI does exist as shown with the HTTPie command above.

carueda commented 4 years ago

3.9.1 enabled for the MMI ORR. (@graybeal )

Now all self-hosted ontology entries having a # in the IRI are properly assigned encoded links for corresponding resolution.

A handy way to test this is to enter # in the filter field and then inspect the relevant entries, which are those having https://mmisw.org/ont as prefix. (All other non-self-hosted should continue to be dispatched properly.)

image