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

annotations displayed in via but not in extension #2309

Closed
judell opened this issue Jun 11, 2015 · 3 comments
Closed

annotations displayed in via but not in extension #2309

judell opened this issue Jun 11, 2015 · 3 comments

Comments

@judell
Copy link
Contributor

judell commented Jun 11, 2015

URI: https://languagedebates.wordpress.com/category/text-messaging-and-literacy/#

user: Qasem

Observations:

Annotations display using via, not using extension

From: https://hypothes.is/api/search?user=Qasem, the annotated URI is:

"uri": "https://via.hypothes.is/https://languagedebates.wordpress.com/category/text-messaging-and-literacy/#",

with aliases:

                    {
                        "href": "https://via.hypothes.is/https://languagedebates.wordpress.com/category/text-messaging-and-literacy/#"
                    }, 
                    {
                        "href": "https://languagedebates.wordpress.com/category/text-messaging-and-literacy/#", 
                        "type": "", 
                        "rel": "canonical"
                    }

In via the app searches both with these results:

https://hypothes.is/api/search?limit=200&offset=0&order=asc&sort=created&uri=https:%2F%2Flanguagedebates.wordpress.com%2Fcategory%2Ftext-messaging-and-literacy%2F ->0

https://hypothes.is/api/search?limit=200&offset=0&order=asc&sort=created&uri=https:%2F%2Fvia.hypothes.is%2Fhttps:%2F%2Flanguagedebates.wordpress.com%2Fcategory%2Ftext-messaging-and-literacy%2F ->2

In the extension the app searches only once:

https://hypothes.is/api/search?limit=200&offset=0&order=asc&sort=created&uri=https:%2F%2Flanguagedebates.wordpress.com%2Fcategory%2Ftext-messaging-and-literacy%2F -> 0

@nickstenning
Copy link
Contributor

Currently looking into all our various document equivalence issues, so here's what's happening here.

  1. The annotation has been stored with a via URL: https://via.hypothes.is/http://...
  2. The JS client will search for all URLs it can find:
    • In via, that is both the via URL and the original page URL, because via injects:

      <link rel="canonical" href="http://languagedebates.wordpress...">
    • But in the extension, that is only the current page URL (naturally, the page doesn't know anything about "via").

  3. The search doesn't expand a URL to include the via-prefixed version.

I'm not going to suggest how to fix this here because I'm going to start a thread to discuss all of these issues at once.

@nickstenning nickstenning added Bug and removed P3 labels Jul 21, 2015
@judell
Copy link
Contributor Author

judell commented Sep 9, 2015

@nickstenning
Copy link
Contributor

This is fixed, including past annotations, with two caveats.

  1. Annotations newly created in via will still append "via" equivalences to their document field. That is, an annotation on http://example.com made through via will still create an equivalence with https://via.hypothes.is/http://example.com. This is harmless.
  2. Somewhat more problematically, the presence of <link rel="canonical">, injected by via, will declare the original page URL to be canonical. This is a strong claim and could well cause problems because at the moment our application will not expand a search for URIs that it thinks to be "canonical" to other URIs. See past discussion of this issue at Don't expand URIs if the search URI is a rel="canonical" #2652.

We will probably have to revisit 2. soon, but we're in the process of rebuilding the document equivalence database so it can wait until after that.

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

No branches or pull requests

2 participants