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
why so many orphans at https://www.washingtonpost.com/news/energy-environment/wp/2017/01/18/u-s-scientists-officially-declare-2016-the-hottest-year-on-record-that-makes-three-in-a-row ? #143
Comments
@robertknight can you comment on what might be happening (or happened here)? If you look at the annotations in the orphans tab, the text that many of the orphans originally anchored to, is still present. And it's not clear why they would show up in the annotations tab. @judell thanks for finding this. |
I'm going to be looking into this issue this afternoon and updating this with my findings. |
Can you check the aliases for that URL in the db? Sometimes ClimateFeedback annotate a copy of an article that's not openly available to the team, and I'm wondering if that may be a factor. |
Couple of observations so far:
|
Found the issue. The problem is as follows:
I'll get this fixed upstream in the The more general solution to this category of problem is to find ways to isolate Hypothesis from the page's JavaScript. |
for .. in loops iterate over all enumerable properties of an object, including those on the prototype. This means that if the code runs in an environment where Array.prototype contains enumerable properties, it will loop over those too. Use Array.prototype.reduce instead as a natural companion to a fold function. See hypothesis/product-backlog#143
Also seeing the same issues on this page @robertknight https://via.hypothes.is/www.newyorker.com/science/maria-konnikova/being-a-better-online-reader |
In the case of http://www.newyorker.com/science/maria-konnikova/being-a-better-online-reader , all annotations anchor correctly when using the extension but a significant number (41 at the time of writing) fail to anchor when the page is loaded in Via. |
Possibly related #146 |
I've had another look at the three URLs mentioned above: http://www.newyorker.com/science/maria-konnikova/being-a-better-online-reader In all 3 cases, the issue is the one described in #143 (comment). You can check by running |
…otype Update dom-anchor-text-quote to incorporate tilgovi/dom-anchor-text-quote#11 which fixes quote anchoring on pages which include JS that adds enumerable properties to `Array.prototype`. Fixes hypothesis/product-backlog#143
Excellent fix, thanks @robertknight! |
* Avoid using `for ( .. in .. )` to iterate over arrays for .. in loops iterate over all enumerable properties of an object, including those on the prototype. This means that if the code runs in an environment where Array.prototype contains enumerable properties, it will loop over those too. Use Array.prototype.reduce instead as a natural companion to a fold function. See hypothesis/product-backlog#143 * Correct test case description to match assertion * Add a couple of additional test cases for long quotes Given that long quotes are processed in chunks, add tests that check for matches and non-matches in different 32-char chunks within a string. * Refactor check for `acc` being null As suggested in tilgovi#11 (review)
https://www.washingtonpost.com/news/energy-environment/wp/2017/01/18/u-s-scientists-officially-declare-2016-the-hottest-year-on-record-that-makes-three-in-a-row/
The orphan text (copied from an annotation):
"NASA concurred with NOAA, also declaring 2016 the warmest year on record in its own dataset that tracks the temperatures at the surface of the planet’s land and oceans, and expressing “greater than 95 percent certainty” in that conclusion. (In contrast, NOAA gave a 62 percent confidence in the broken record.)"
The text in the story (copied from the story):
"NASA concurred with NOAA, also declaring 2016 the warmest year on record in its own data set that tracks the temperatures at the surface of the planet’s land and oceans, and expressing “greater than 95 percent certainty” in that conclusion. (In contrast, NOAA gave a 62 percent confidence in the broken record.)"
Why the orphans on this page?
We'll definitely hear from Climate Feedback about this, so would be good to have an answer in hand before turning on the orphans tab.
The text was updated successfully, but these errors were encountered: