{"action":"created","issue":{"url":"https://api.github.com/repos/openannotation/annotator/issues/504","labels_url":"https://api.github.com/repos/openannotation/annotator/issues/504/labels{/name}","comments_url":"https://api.github.com/repos/openannotation/annotator/issues/504/comments","events_url":"https://api.github.com/repos/openannotation/annotator/issues/504/events","html_url":"https://github.com/openannotation/annotator/issues/504","id":67518499,"number":504,"title":"Previously created annotations not loaded on the web page even though search API returns correct range data for the annotation","user":{"login":"apurvajalit","id":4033452,"avatar_url":"https://avatars.githubusercontent.com/u/4033452?v=3","gravatar_id":"","url":"https://api.github.com/users/apurvajalit","html_url":"https://github.com/apurvajalit","followers_url":"https://api.github.com/users/apurvajalit/followers","following_url":"https://api.github.com/users/apurvajalit/following{/other_user}","gists_url":"https://api.github.com/users/apurvajalit/gists{/gist_id}","starred_url":"https://api.github.com/users/apurvajalit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apurvajalit/subscriptions","organizations_url":"https://api.github.com/users/apurvajalit/orgs","repos_url":"https://api.github.com/users/apurvajalit/repos","events_url":"https://api.github.com/users/apurvajalit/events{/privacy}","received_events_url":"https://api.github.com/users/apurvajalit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-10T06:08:56Z","updated_at":"2015-04-10T16:23:35Z","closed_at":null,"body":"I have implemented my own store backend with the all the required APIs implemented. I am using loadFromSearch due to which annotator when initialized, searches for the annotations for that page for a user. I checked for the response returned and it seems correct and exactly the same as that was sent when annotation is created except that fields like created, updated and ID are added in the response. On stepping closely over the annotatorjs, I found that an **exception** is thrown in function *setupAnnotation* when this statement is executed: *normedRanges.push(Range.sniff(r).normalize(root))*. The error message is :**\"Couldn't find offset undefined in element /p[1]\"** which leads to execution of this statement **this.publish(\"rangeNormalizeFail\", [annotation, r, e])**\r\n\r\nThe request on creation is as *{\"ranges\":[{\"start\":\"/p[1]\",\"startOffset\":884,\"end\":\"/p[1]\",\"endOffset\":899}],\"quote\":\"Information Age\",\"text\":\"AnnotationText\",\"tags\":[],\"uri\":\"http://localhost:5555/Home/TestPopup\",\"user\":2}*\r\n\r\nResponse:\r\n*{\"total\":1,\"rows\":[{\"ranges\":[{\"start\":\"/p[1]\",\"startoffset\":884,\"end\":\"/p[1]\",\"endoffset\":899}],\"quote\":\"Information Age\",\"text\":\"AnnotationText\",\"tags\":[],\"uri\":\"http://localhost:5555/Home/TestPopup\",\"user\":2,\"id\":10040,\"created\":\"2011-05-24T18:52:08.036814\",\"updated\":\"2011-05-24T18:52:08.036814\"}]}*\r\n\r\nI have posted this issue on the mailing list too, but have not received any responses. Hence treating it as an issue."},"comment":{"url":"https://api.github.com/repos/openannotation/annotator/issues/comments/91607482","html_url":"https://github.com/openannotation/annotator/issues/504#issuecomment-91607482","issue_url":"https://api.github.com/repos/openannotation/annotator/issues/504","id":91607482,"user":{"login":"apurvajalit","id":4033452,"avatar_url":"https://avatars.githubusercontent.com/u/4033452?v=3","gravatar_id":"","url":"https://api.github.com/users/apurvajalit","html_url":"https://github.com/apurvajalit","followers_url":"https://api.github.com/users/apurvajalit/followers","following_url":"https://api.github.com/users/apurvajalit/following{/other_user}","gists_url":"https://api.github.com/users/apurvajalit/gists{/gist_id}","starred_url":"https://api.github.com/users/apurvajalit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apurvajalit/subscriptions","organizations_url":"https://api.github.com/users/apurvajalit/orgs","repos_url":"https://api.github.com/users/apurvajalit/repos","events_url":"https://api.github.com/users/apurvajalit/events{/privacy}","received_events_url":"https://api.github.com/users/apurvajalit/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T16:23:35Z","updated_at":"2015-04-10T16:23:35Z","body":"It finally worked!!! Thank you so much.. you rock!\n\nThanks,\nApurva Jalit\n\nOn Fri, Apr 10, 2015 at 9:03 PM, Randall Leeds <notifications@github.com>\nwrote:\n\n> It looks like the case of startOffset changed. Your request says\n> startOffset but your response says startoffset. The first is correct, I\n> think.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/openannotation/annotator/issues/504#issuecomment-91594006>\n> .\n>\n"}}