Page MenuHomePhabricator

When using the Pivot skin on MW 1.43, images included in templates are not displayed
Closed, ResolvedPublicBUG REPORT

Description

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

On a wiki running MediaWiki 1.39, have a template with the following contents:

<div>
{| class="cmbox"  style="border: 2px; border-style: solid; border-color: #8E2043; width: 100%; vertical-align: middle;"
|-
| class="cmbox-image" style="vertical-align: middle; width: 70px"|[[Datei:mb-achtung.png|none|link=]]
| class="cmbox-text"|{{{1}}}
|}
</div>

Upgrade MediaWiki from 1.39 to 1.43, and run the update.php script.

View the template using the Pivot skin.

What happens?:

When using the Pivot skin, the images no longer appear in the templates, although the image files exist (i.e. Datei:Mb-achtung.png still exists).

What should have happened instead?:

The images should be shown.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

MW 1.43

Event Timeline

Aklapper renamed this task from The images included in templates disappear after upgrade to Images included in templates not displayed on Special:UncategorizedTemplates after upgrade to 1.43.Mar 20 2025, 9:15 AM
Pppery subscribed.

I don't see what this has to do with Special:UncategorizedTemplates. It's just a parser issue.

S0ring triaged this task as High priority.May 16 2025, 8:22 AM

The images are missing in all templates upgrade to 1.43, not only on Special:UncategorizedTemplates. We have 3 wiki's where this issue occured.

This issue is still present on the newest MW 1.43.1, could someone take a look and try to reproduce it pls?

JJMC89 raised the priority of this task from High to Needs Triage.May 16 2025, 3:11 PM

@Aklapper: I just wanted to get your attention to this issue which it blocks our migration on 3 wikis. But meanwhile the priority has been changed from High to Needs Triage.

@S0ring: "My attention" does not change or fix anything. :) Please don't fiddle with the Priority field to get attention. Thanks.

A_smart_kitten subscribed.

@S0ring, to confirm if I'm understanding you correctly, is the issue here that — there's a template with the following contents:

<div>
{| class="cmbox"  style="border: 2px; border-style: solid; border-color: #8E2043; width: 100%; vertical-align: middle;"
|-
| class="cmbox-image" style="vertical-align: middle; width: 70px"|[[Datei:mb-achtung.png|none|link=]]
| class="cmbox-text"|{{{1}}}
|}
</div>

On MediaWiki 1.39, that template displays the image (mb-achtung.png). However, after upgrading to MediaWiki 1.43, the image is no longer displayed.
Is that correct, or am I misunderstanding something? (/genuine question)

@S0ring, to confirm if I'm understanding you correctly, is the issue here that — there's a template with the following contents:

<div>
{| class="cmbox"  style="border: 2px; border-style: solid; border-color: #8E2043; width: 100%; vertical-align: middle;"
|-
| class="cmbox-image" style="vertical-align: middle; width: 70px"|[[Datei:mb-achtung.png|none|link=]]
| class="cmbox-text"|{{{1}}}
|}
</div>

On MediaWiki 1.39, that template displays the image (mb-achtung.png). However, after upgrading to MediaWiki 1.43, the image is no longer displayed.
Is that correct, or am I misunderstanding something? (/genuine question)

Yes, this is the case. After migration 1.35 -> 1.39 with the same templates the images were displayed, but after 1.39 -> 1.43 no more.

A_smart_kitten renamed this task from Images included in templates not displayed on Special:UncategorizedTemplates after upgrade to 1.43 to Images included in templates are not displayed after upgrading to MW 1.43.May 19 2025, 8:18 AM
A_smart_kitten updated the task description. (Show Details)

Thanks for the confirmation! I'll see if I can try to reproduce the issue when I get a chance (hopefully in the next week or so). Feel free to ping me on this task for an update if it's been some time since this comment & I haven't said anything more.
(Of course, anyone else is welcome to attempt to reproduce this before me if they wish to do so :))

@S0ring to assist in reproducing the issue, if possible, please could you also confirm:

  • the site/interface language of the wiki(s) in question
  • the extensions & skins that are installed on the wiki(s) in question (in case any of them are causing the issue here)

If the wiki(s) in question have any custom configuration settings that have been set for them (e.g., in LocalSettings.php), it may also help with reproducing the issue if you're able to share the values of these custom configuration variables. However, please be careful to not share any private/confidential data (e.g. passwords) that might also be present in your wiki's configuration file :)

As a side note, please could you also confirm whether or not images are correctly displayed in non-template pages following the upgrade to MW 1.43?

Thanks to your comments regarding which extensions & skins that are installed on the wiki(s).

It gives me the idea to deactivate the Pivot skin which was installed on all 3 affected wikis and it occured this is actually the culprit: by using a different skin (i.e. vector) the images of the templates are displayed.

Replacing pivot-REL1_43 with pivot-master version [1] didn't help, the issue isn't fixed. Actually there aren't relevant changes so far [2]

[1] https://github.com/wikimedia/mediawiki-skins-Pivot
[2] https://github.com/wikimedia/mediawiki-skins-Pivot/compare/master...REL1_43

A_smart_kitten renamed this task from Images included in templates are not displayed after upgrading to MW 1.43 to When using the Pivot skin on MW 1.43, images included in templates are not displayed.May 19 2025, 10:53 AM
A_smart_kitten updated the task description. (Show Details)

I wouldn't be surprised if "not displayed" means that the image is responsively sized to be 0x0 pixels, because the text content in the template is wider than the page width.
Responsively sizing images is harder than people think.

I don't know any wikis that have Pivot installed, so difficult to quickly confirm if so.

<div>
{| class="cmbox"  style="border: 2px; border-style: solid; border-color: #8E2043; width: 100%; vertical-align: middle;"
|-
| class="cmbox-image" style="vertical-align: middle; width: 70px"|[[File:Fire (Element) Icon.png|none|link=]]
| class="cmbox-text"|{{{1}}}
|}
</div>

To confirm: I have Mediawiki 1.43.1 installed, and the latest Pivot.
Using the exact content provided, and just swapping to to an existing image, shows the problem is likely in the CSS somewhere.

Removing the |none parameter on the image fixes the issue. And yes, when no image size is set, and |none is set the image shows as 0px (putting a border on its element showed me it does display, it's just displaying at 0px).

S0ring claimed this task.

The workaround to remove the |none parameter on the image works.