Page MenuHomePhabricator

CopyPatrol compare buttons not working
Closed, ResolvedPublic

Description

In CopyPatrol, there's buttons to compare potential sources with an article. Instead of reporting results clicking on the buttons returns "An unknown error occurred when loading results. Please try again."

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@MusikAnimal Pinging you, in case you may know how to solve this issue/have any suggestions. Thanks!

Ah, this is a side effect of moving to toolforge.org. CopyPatrol now is it's own domain (separate from Copyvios), so the request is getting blocked by the cross-origin policy. The solution is for Copyvios to implement CORS support.

@Earwig Would you be able to set this up for us? If I knew any bit of Python I would attempt it myself. If you are able to keep it internal you could whitelist *.toolforge.org, rather than opening your API up to the whole world.

In the meantime, we can implement a proxy within CopyPatrol as a workaround. I'll open a PR shortly.

Earwig Would you be able to set this up for us? If I knew any bit of Python I would attempt it myself. If you are able to keep it internal you could whitelist *.toolforge.org, rather than opening your API up to the whole world.

Please disregard. It would seem the differing subdomain doesn't matter. Simply updating the URL to go to https://copyvios.toolforge.org rather than https://tools.wmflabs.org/copyvios did the trick.

PR: https://github.com/wikimedia/CopyPatrol/pull/86

MusikAnimal claimed this task.

Fix has been merged and deployed! You may have to clear your browser cache for the fix to take effect, but it will expire on its own eventually.

Wow, that worked.

Very impressed regarding the speed at which this was handled.

I use this option a lot, so thanks.

Phil

The bot may need to be re-started - there's been only one report in the last 6 hours, and the most recent one was 2.5 hours ago. Normally there's 5 to 10 reports per hour. Thank you!

Normal activity level has resumed and has been okay for quite a few hours. Closing. Thanks again.

@MusikAnimal I see this is resolved, but to provide an explanation: copyvios already sends Access-Control-Allow-Origin: *. I think the issue was because the tools.wmflabs.org legacy redirect doesn't send it, so CopyPatrol couldn't follow it. Is this something that should be addressed in the legacy redirect?