Page MenuHomePhabricator

Gadget-XTools-ArticleInfo CORS error
Closed, ResolvedPublicBUG REPORT

Description

Reported by SWinxy on Discord

Steps to replicate the issue (include links if applicable):

What happens?:

  • XTools ArticleInfo doesn't load. Displays a blinking dot to indicate that it is trying to load, but is never replaced with the ArticleInfo
  • Console contains 2 identical CORS errors: Access to XMLHttpRequest at 'https://xtools.wmflabs.org/api/page/articleinfo/en.wikipedia.org/StarRay?format=html&uselang=en' from origin 'https://en.wikipedia.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

image.png (515×1 px, 29 KB)

image.png (99×1 px, 14 KB)

What should have happened instead?:

  • XTools ArticleInfo should be displayed in the article's header

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

MusikAnimal moved this task from Backlog to Page History on the XTools board.
MusikAnimal subscribed.

On it! Thanks for reporting.

Well, that was easy, for what I hope is most users: https://www.mediawiki.org/?diff=5885111 and https://en.wikipedia.org?diff=1150781587

For a moment there I thought I had broke CORS support, as the error implies. We moved to a new VPS server today so the old URL has irreversibly been redirected to xtools.wmcloud.org.

A global search shows a number of other wikis need updating too... I might use my staff account to fix those (both as IAR and that this is an official Community-Tech product), as I'm still waiting to get my global interface editing rights on Meta. Didn't even think about the gadget before I did the deploy today or else I would have applied sooner!

MusikAnimal moved this task from Page History to General / other on the XTools board.

Alright, I've fixed all the gadgets found via global search. There's plenty of direct links still using wmflabs.org but those are fine for now.

I'm going to leave this task open because any JS client of the XTools API would need to update the domain in their code, and I know there are clients external to WMF wikis. I feel like the issue is fixable server-side but I haven't figured it out yet.

MusikAnimal moved this task from General / other to Complete on the XTools board.

I think it's safe to call this resolved now.