Page MenuHomePhabricator

Characters are missing in the chart of EasyTimeline on zhwiki
Closed, ResolvedPublicBUG REPORT

Description

What happens?:
As the title says, the chart rendered by zhwiki's EasyTimeline has missing characters.

example:
Template:監督員任期時間線

EasyTimeline.png (323×923 px, 11 KB)

What should have happened instead?:
Of course, the characters are rendered normally.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
Just like the mediawiki production environment version used by wikimedia.

T22825 : This task has solved the long-standing EasyTimeline rendering character loss problem. It seems that the font file of a certain application server is missing. It may be a reference.

Event Timeline

Cwek updated the task description. (Show Details)

@Aklapper
Negative! T188997 is about zh-yue wiki. It's NOT for zhwiki. According to the report in the technical discussion section, the problem seems to have been discovered on October 1, 2021.

VulpesVulpes825 added a subscriber: VulpesVulpes825.

This might be an issue with operations/mediawiki-config, causing the font files not linked for display.

Wasn't easy timeline moved to Shellbox ? Probably those Kubernetes hosts don't have the entire set of fonts they require I guess ?

Wasn't easy timeline moved to Shellbox ? Probably those Kubernetes hosts don't have the entire set of fonts they require I guess ?

This suggest solution from T22825 needs to implement in the Kubernetes host based on solution from T274822

Legoktm added a subscriber: Legoktm.

Something is wrong with the special unifont for zh wikis, when I switch that timeline to use a different font (|font=freesanswmf) it partially displays.

unifont is installed in the container:

km@cashew ~/g/o/puppet> podman run --rm -it --entrypoint=bash --user=root docker-registry.wikimedia.org/wikimedia/mediawiki-libs-shellbox:timeline
root@fc7084afe8ed:/srv/app# ls fonts/
FreeSans.ttf  FreeSansWMF.ttf  unifont-5.1.20080907.ttf

and afaict configured properly on the MW side;

legoktm@mwmaint1002:~$ mwscript shell.php --wiki=zhwiki
Psy Shell v0.10.8 (PHP 7.2.34-18+0~20210223.60+debian10~1.gbpb21322+wmf2 — cli) by Justin Hileman
>>> return $wgTimelineFonts
=> [
     "freesans" => "/srv/app/fonts/FreeSans",
     "freesanswmf" => "/srv/app/fonts/FreeSansWMF",
     "unifont" => "/srv/app/fonts/unifont-5.1.20080907",
     "default" => "/srv/app/fonts/unifont-5.1.20080907",
   ]

I'll keep digging...

For some reason, ploticus does not like the name of "unifont-5.1.20080907.ttf". When I renamed it to "unifont.ttf" it became happy. This makes no sense to me because it's always been called that and it's not like we switch gd or ploticus versions or anything.

Change 732759 had a related patch set uploaded (by Legoktm; author: Legoktm):

[mediawiki/libs/Shellbox@master] pipeline: Rename unifont to \"unifont.ttf\" to please ploticus

https://gerrit.wikimedia.org/r/732759

Change 732761 had a related patch set uploaded (by Legoktm; author: Legoktm):

[operations/mediawiki-config@master] Update $wgTimelineFonts for new path to unifont in Shellbox container

https://gerrit.wikimedia.org/r/732761

Change 732759 merged by jenkins-bot:

[mediawiki/libs/Shellbox@master] pipeline: Rename unifont to \"unifont.ttf\" to please ploticus

https://gerrit.wikimedia.org/r/732759

Change 732761 merged by jenkins-bot:

[operations/mediawiki-config@master] Update $wgTimelineFonts for new path to unifont in Shellbox container

https://gerrit.wikimedia.org/r/732761

For some reason, ploticus does not like the name of "unifont-5.1.20080907.ttf". When I renamed it to "unifont.ttf" it became happy. This makes no sense to me because it's always been called that and it's not like we switch gd or ploticus versions or anything.

@Legoktm
Does ploticus also use fontconfig/freetype2 ? Because I remember from a very long time ago that if you don't have correct fontconfig or didn't run fc-cache at least once, that font name resolving would break exactly like this. (We used to have this problem with VLC media player like a bazillion years ago).

Just a thought, thx for fixing this!

Mentioned in SAL (#wikimedia-operations) [2021-10-21T19:42:40Z] <legoktm@deploy1002> Synchronized wmf-config/CommonSettings.php: Update $wgTimelineFonts for new path to unifont in Shellbox container (T293050) (duration: 00m 55s)

Screenshot 2021-10-21 at 12-34-58 Template 監督員任期時間線 - Wikipedia.png (941×2 px, 126 KB)

The fixed timelines should show up right away, if not a purge should do it. Sorry about not catching/testing this earlier.

For some reason, ploticus does not like the name of "unifont-5.1.20080907.ttf". When I renamed it to "unifont.ttf" it became happy. This makes no sense to me because it's always been called that and it's not like we switch gd or ploticus versions or anything.

@Legoktm
Does ploticus also use fontconfig/freetype2 ? Because I remember from a very long time ago that if you don't have correct fontconfig or didn't run fc-cache at least once, that font name resolving would break exactly like this. (We used to have this problem with VLC media player like a bazillion years ago).

I think ploticus just delegates all the font stuff to gd, I kind of don't want to look in the ploticus source code. But even on appservers, I don't see any place we install the fontconfig for unifont, it was just the ttf file that was copied into git.

legoktm@mwdebug1001:~$ fc-match unifont
DejaVuSans.ttf: "DejaVu Sans" "Book"

However, I wouldn't be surprised if it ended up being something like us not running fc-cache in the container while something else makes it run on appservers and that's what has magically made it work this entire time.

Just a thought, thx for fixing this!

:)

Stang removed a subscriber: Stang.