Page MenuHomePhabricator

Badges not displaying on trwiki
Closed, ResolvedPublic


Badges supposed to be displayed next to interwiki links on the left are not working on trwiki. Please see this featured list for an example.

Event Timeline

Hi @Superyetkin, thanks for taking the time to report this!
Can you please elaborate where exactly to see this? Which kind of badge would you expect where exactly (names of strings or screenshots, please)?

Ah, alright. I opened the web browser's developer tools, went to their "Network" tab and I see that there is a 404 error:

This is maybe a defect on the deployment of the badges extension/Wikidata or a breakage on apache redirects. However, I have open other languages, that show the image on the browser, and all generate a 404- the image comes from a base64 encoding, not from the static image:

Styles applied to featured articles:

* list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAIAAAD0YtNRAAAABnRST…NBmAlUiyaBkENoxZSDWnOtBmoAQu7TnT+3WuDOA7KBIkAGAGwiNeqjusp/AAAAAElFTkSuQmCC);
* list-style-image: url(/w/extensions/WikimediaBadges/resources/images/badge-golden-star.png?ed948)!ie;

I am inclined to think it looks like a deployment mistake, for some reasons, on tr, the applied style is, on top of the others:


I am using as a base for checking (it is featured on enwiki and others).

This happened because we removed the bundle of Wikidata from the production and thus the addresses got lost. Where these addresses have used? in Vector.css of trwiki. In order to bring the badges back, you just need to delete the rules at the bottom of the page. Maybe we should do a grep to check if more cases are still being used in Wikipedia-land CC. @Lydia_Pintscher.

@Superyetkin As per Ladsgroup, it seems the CSS you added here is not correct Please double check it.

@Ladsgroup Apparently, that reference is not the only one, I think it is a very common addition, but it works on others because it is overriden, see my comment above. While not necessarily our responsability, maybe we should announce it louder so people retire the invalid reference from other wikis too.

Superyetkin claimed this task.

Thanks, removing the redundant code solved the issue.

I fully agree with jcrespo in that there may be other wikis still using similar code blocks. Tech News would be the best place to make an announcement to help inform people regarding the issue.

I don't think we have anything else that is used wiki-wide in large scale. Unless my query is wrong.

ladsgroup@tin:~$ mwgrep "WikimediaBadges"
bhwiki              MediaWiki:Gadget-LiveRCSiteConfig.js
fiwiki              MediaWiki:Gadget-LiveRCSiteConfig.js
frwiki              MediaWiki:Gadget-LiveRCSiteConfig.js
frwiki              MediaWiki:Gadget-LiveRCSiteConfig.js/Dev.js
itwiki              MediaWiki:Gadget-LiveRCSiteConfig.js
kabwiki             MediaWiki:Gadget-LiveRCSiteConfig.js

(total: 6, shown: 6)
ladsgroup@tin:~$ mwgrep "WikimediaBadges" --user
dewiki              User:Dr Brains/LiveRCSiteConfig.js
enwiki              User:Ladsgroup/monobook.css
enwiki              User:Mr. Guye/sandbox.js/debug.js
fawiki              User:Alfa80/Gadget-LiveRCSiteConfig.js
frwikinews          User:Dr Brains/LiveRCSiteConfig.js
hiwiki              User:SM7/Gadget-LiveRCSiteConfig.js

(total: 6, shown: 6)
curl '' \
| grep '/w/extensions/WikimediaBadges/resources/images/badge-golden-star.png'

Screenshot_20180213_205100.png (256×330 px, 18 KB)

It could me my browser, though- I do not claim to understand anything near the frontend.

One tip, add &debug=true so it doesn't minify the result and seeing results will be easier:

curl '' | grep -C 50 '/w/extensions/WikimediaBadges/resources/images/badge-golden-star.png'

The result is okay:

.badge-featuredlist {
	list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAIAAAD0YtNRAAAABnRSTlMA/AD+APzoM1ogAAAAWklEQVR4AWP48+8PLkR7uUdzcMvtU8EhdykHKAciEXL3pvw5FQIURaBDJkARoDhY3zEXiCgCHbNBmAlUiyaBkENoxZSDWnOtBmoAQu7TnT+3WuDOA7KBIkAGAGwiNeqjusp/AAAAAElFTkSuQmCC);
	list-style-image: url(/w/extensions/WikimediaBadges/resources/images/badge-golden-star.png?ed948)!ie;

This is part of WikimediaBadges extension:
The thing is that the url is not giving out 404:
The url that was giving out 404 for trwiki had an extra Wikidata bundle:
The reason that the url is struck through in your browser is that, it's not using that url and it's using the SVG version (the above list-style-image rule) instead which is faster.