Page MenuHomePhabricator

MediaWiki:Pageinfo-header graphs not displaying on ruwiki, "unknown error"
Open, Needs TriagePublic

Event Timeline

Restricted Application added subscribers: Base, Aklapper. · View Herald Transcript
MusikAnimal subscribed.

I cannot explain why this broke, maybe a change to how that interface message is parsed? It is odd that nothing in Pageinfo-header is showing up. I did a quick test on test.wikipedia.org, and Pageinfo-header is at least showing up (I did not try adding the graphs and such).

MediaWiki:Pageinfo-footer is the more common place for external links. You might try using that instead, just to see if it works.

At any rate, I'm quite certain this has nothing to do with the Pageviews-API, Tool-Pageviews, PageViewInfo, or the MediaWiki-extensions-Graph extension. Filing this under MediaWiki-User-Interface for now.

MusikAnimal renamed this task from Pageview graphs doesn't work on ruwiki to MediaWiki:Pageinfo-header not displaying on ruwiki.Sep 10 2019, 2:19 AM
Aklapper renamed this task from MediaWiki:Pageinfo-header not displaying on ruwiki to MediaWiki:Pageinfo-header graphs not displaying on ruwiki, "unknown error".Sep 10 2019, 5:22 AM

@MusikAnimal what external links are you talking about? Problem is not in external links.
And Pageinfo-header is showing (look at "За последние 30 дней" string).
Bug is just in displaying of charts. This image fails to load:
https://ru.wikipedia.org/api/rest_v1/page/graph/png/Москва/0/b22a95b9d24f05183cbb9bfab90772bb58c13a8c.png
(error: {"type":"https://mediawiki.org/wiki/HyperSwitch/errors/unknown_error","method":"get","uri":"/ru.wikipedia.org/v1/page/graph/png/%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0/0/b22a95b9d24f05183cbb9bfab90772bb58c13a8c.png"})
While this one is fine:
https://ru.wikipedia.org/api/rest_v1/page/graph/png/Участник%3AVort%2FЧерновик/0/b22a95b9d24f05183cbb9bfab90772bb58c13a8c.png

I think this is some kind of caching issue. Because here https://ru.wikipedia.org/wiki/MediaWiki:Pageinfo-header, before i done my test edit, charts was broken too. Another question, why on some namespaces charts are drawn in img tag, while on other namespaces in canvas? Example of canvas - https://ru.wikipedia.org/w/index.php?title=Участник:Serhio_Magpie/Черновик&oldid=102097993.

Another examples of broken charts in eswiki:
https://es.wikipedia.org/wiki/Discusión:Novela_rosa
https://es.wikipedia.org/wiki/Discusión:Rosalía_de_Castro
https://es.wikipedia.org/wiki/Discusión:George_Michael
And again, after editing or purging the cache they appear normally.

@MusikAnimal what external links are you talking about? Problem is not in external links.
And Pageinfo-header is showing (look at "За последние 30 дней" string).
Bug is just in displaying of charts. This image fails to load:
https://ru.wikipedia.org/api/rest_v1/page/graph/png/Москва/0/b22a95b9d24f05183cbb9bfab90772bb58c13a8c.png

Sorry, I meant the everything in Pageinfo-header (which includes some external links at the bottom). When I go to https://ru.wikipedia.org/w/index.php?title=TAM_(электросвязь)&action=info for instance I don't see any of the content from https://ru.wikipedia.org/wiki/MediaWiki:Pageinfo-header.

But anyway, sounds like something indeed is wrong with the graphs, specifically? I think in that case this should be tagged with MediaWiki-extensions-Graph. It might also have something to do with the RESTBase-API. I'm just fairly certain that the Pageviews-API is not the culprit.

In T232388#5489715, MusikAnimal wrote:

I finally figured this out. I need to view the page in the same language as the wiki! See Russian versus English. I realize that doesn't help your problem, I just thought I'd share this discovery!

Now that I can see it, it's pretty clear to me this is probably an issue with the MediaWiki-extensions-Graph extension or RESTBase-API, and not MediaWiki-User-Interface in general. Sorry for the noise.

Pay attention that it works fine in preview: ruwiki, hewiki.

TheDJ claimed this task.
TheDJ subscribed.

Fixed now we no longer have Graphoid

Actual stable link: https://ru.wikipedia.org/w/index.php?title=TAM_(электросвязь)&action=info&uselang=ru

Oh wait.. You modified the Mediawiki UI to add wikitext graphs ?
That cannot without graphoid's static fallback content and also will not work with the JS graphs, as JS of a pageview is not loaded on the info page and there is also no hook for it to start the parsing even if the JS were loaded. Maybe if you write a custom gadget to only operate on those pages?

In general I wouldn't do this however, an interactive element like this is for wiki pages, not for the MediaWiki userinterface.

Actual stable link: https://ru.wikipedia.org/w/index.php?title=TAM_(электросвязь)&action=info&uselang=ru

Oh wait.. You modified the Mediawiki UI to add wikitext graphs ?
That cannot without graphoid's static fallback content and also will not work with the JS graphs, as JS of a pageview is not loaded on the info page and there is also no hook for it to start the parsing even if the JS were loaded. Maybe if you write a custom gadget to only operate on those pages?

In general I wouldn't do this however, an interactive element like this is for wiki pages, not for the MediaWiki userinterface.

Thanks for the detailed comment, although it became clear why it does not work.

Jdlrobson changed the task status from Open to Stalled.Apr 24 2023, 9:55 PM
Jdlrobson moved this task from Backlog to Feature requests on the MediaWiki-extensions-Graph board.
Jdlrobson subscribed.

This looks stalled. What needs to happen?

This looks stalled. What needs to happen?

Can we make support for displaying graphs on special pages/info pages?

@Iniquity what would that look like? Can you update the description with how you would expect that to work? The ?action=info page already has a graph for page views (click page view number on https://en.wikipedia.beta.wmflabs.org/wiki/Spain?action=info) but I'm guessing you mean embedded in the page some how?

@Iniquity what would that look like? Can you update the description with how you would expect that to work? The ?action=info page already has a graph for page views (click page view number on https://en.wikipedia.beta.wmflabs.org/wiki/Spain?action=info) but I'm guessing you mean embedded in the page some how?

Yes, we displayed the chart directly on the page, without a pop-up. Plus there were two charts, one for the year and the second for the month. We could also customize its display.
https://ru.wikipedia.org/w/index.php?title=MediaWiki%3APageinfo-header&diff=119482511&oldid=118426970

Okay so this is specifically about the ?action=info page ?

(Seems related to this extension - it should perhaps provide a configuration to inline the graphs - would that solve your problem here?)

Okay so this is specifically about the ?action=info page ?

If the charts work exactly on this page, then yes, this will solve the problem.

(Seems related to this extension - it should perhaps provide a configuration to inline the graphs - would that solve your problem here?)

Why did you delete the Graph project? :) The task is in any case related to it. And I dont see any blocker for "stalled" status.

Because the graphs in question are created inside the PageInfo extension which has other maintainers and I wanted to be clear on where the fix needs to be made.

Iniquity changed the task status from Stalled to Open.Apr 27 2023, 11:56 PM
Iniquity removed TheDJ as the assignee of this task.