Page MenuHomePhabricator

format = inline displays as "custom" while not true
Closed, ResolvedPublic

Description

https://meta.wikimedia.org/w/index.php?title=Template:Admin&diff=16412785&oldid=16412771

Format: inline in templatedata.

Output: this template has custom formating.

Thanks.

1.PNG (579×712 px, 29 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdforrester-WMF changed the task status from Open to Stalled.Mar 21 2017, 7:23 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

It shows as "inline" for me – possibly a transient bug?

(All TemplateData tasks automatically get added to the VE umbrella group so that they get seen and triaged along with all the other tasks.)

Ciencia_Al_Poder changed the task status from Stalled to Open.Apr 19 2018, 8:07 PM
Ciencia_Al_Poder added a subscriber: Ciencia_Al_Poder.

Reopening, since I'm currently seeing the "custom formatting" on the page of the description.

Same problem but with format: "block" (this happens with all our templates with TemplateData), MediaWiki 1.30

https://www.wikidex.net/wiki/Documentaci%C3%B3n_de_plantilla:TE/Entrenador

In fact, VE added a lot of unneeded parameters as "inline" when someone edited the page with that template: https://www.wikidex.net/index.php?title=Ruta_212&curid=15422&diff=2168365&oldid=2117685

Related issue to this: this message uses some icon that does not exist in OOUI and therefore is invisible in interface and pushes the text off-center. Someone really needs to get to this and fix both issues (since it is a smaller problem, I don’t think it needs a separate task, just that this one should be fixed someday).

Change 445547 had a related patch set uploaded (by Saint Johann; owner: Saint Johann):
[mediawiki/extensions/TemplateData@master] Fix problems with MediaWiki messages and non-displaying icons

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

I haven’t tested the patch above, but it looks to me like the problem is happening because isset( $formats[$data->format] ) was referencing an unknown variable, so it always returned custom. If anyone could check this, it would be more than appreciated.

This is old and probably more times rejected issue for both inline and block options, @Jdforrester-WMF would maybe know the older tasks.

What exactly is, the one in the topic or the one I fixed with it? The one in the topic is still present in wikis, so it’s not in any way an old issue. TemplateData should not display a message about ‘custom format’ on _every_ format, otherwise the message should be removed entirely.

Same with the icons: if an icon isn’t needed at all, then we should decide to remove it entirely, because right now it is displaying an entirely empty element there. Adding ext.templateData.images module should fix this.

I don't know what you've fixed, but the issue in the description is old and still not solved.

Are you telling this after testing the patch? (In theory, it should’ve fixed the task above.) Disappointing, if so.

I'm describing the current situation on wikis, I didn't know about the patch, which seems not merged yet.

Change 445547 merged by jenkins-bot:
[mediawiki/extensions/TemplateData@master] Fix problems with MediaWiki messages and non-displaying icons

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

matmarex assigned this task to stjn.