Topic on Skin talk:Citizen

PortableInfobox glitches

15
FatalFit (talkcontribs)
What shouldn't happen, viewing the article.
What should happen, shows when viewing the source preview.
What should happen, shows when viewing the source preview.

When using this skin, PortableInfoboxes are glitched out. They appear normal when in the source preview tho, so it should be able to be fixed.

What happens

The infobox headers show small and on the very left with no padding, and collapsible tabs are impossible to open. Left image is what happens when viewing the article, right image is what happens when viewing the source preview (what it should look like).

What should happen

The infobox should appear how it shows in the source preview, the one without the glitches (right image).

Reproducing the issue

On a MediaWiki installation with the Citizen skin and PortableInfobox extensions,

  1. Create a simple infobox for testing (i've supplied code below)
  2. Create a page with the infobox (i've supplied code below), you will see how the infobox is glitchy and has the issues described above.
  3. Edit the page in source mode
    1. Make a change (correct version doesn't show in preview if you don't make a change)
    2. Click preview, the correct version with no glitches will show.
Source code for an infobox template for testing
<infobox>
<title source="name"><default>{{PAGENAME}}</default></title>
<image source="image_skyline"><caption source="skyline_caption" /></image>
<group collapse="closed">
<header>Other media</header>
<image source="image_flag"><caption source="flag_caption"><default>Flag</default></caption></image>
<image source="image_seal"><caption source="seal_caption"><default>Seal</default></caption></image>
<audio source="anthem"><caption source="anthem_caption" /></audio>
</group>
<group>
<header>Group1</header>
<data source="data1"><format>'''Example:''' {{{data1}}}</format></data>
<data source="data2"><format>'''Example:''' {{{data2}}}</format></data>
<data source="data3"><format>'''Example:''' {{{data3}}}</format></data>
</group>
</infobox>
Source code for the infobox in an article
{{InfoboxName
| name = Example name
| image_skyline = Example.svg
| skyline_caption = First image
| image_flag = Example.jpg
| flag_caption = Second image
| image_seal = Example.jpeg
| seal_caption = Third image
| anthem = Example.ogg
| anthem_caption = First audio
| data1 = First
| data2 = Second
| data3 = Third
}}
71.92.218.4 (talkcontribs)

I'm currently experiencing the same problem as well with my wiki. Is there any way to properly resolve this issue?

Alistair3149 (talkcontribs)

Would you be able to verify if the latest in the main branch fixes the issue for you?

FatalFit (talkcontribs)

Unfortunately it's still happening with MediaWiki 1.40.0 and the latest github version. Photo on Imgur

PiperMcCorkle (talkcontribs)

I'm seeing this behavior at main's tip (edfb43ffd85b59a3bc40fb401d624f6e5b4b1077) with MediaWiki 1.40.0.

D0wnl04d3r97 (talkcontribs)

I still have this glitch on Mediawiki 1.41. Any suggestion?

Alistair3149 (talkcontribs)

I am unable to reproduce it here. What version of Citizen and PortableInfobox are you using?

D0wnl04d3r97 (talkcontribs)

I'm using Citizen 2.11.1 and Portable Infobox 0.6

Alistair3149 (talkcontribs)

Do you have a live demo? I can't reproduce it on a wiki with similar setup, so I'm unable to do anything about it.

D0wnl04d3r97 (talkcontribs)

My wiki is: https://www.croftmanor.it/index.php?title=Rise_of_the_Tomb_Raider

inspecting the page i See that ther is an empty box before any item in the Portable Infobox. How can I edit it and delete these boxes?

I refer to "<div class="pi-item pi-data pi-item-spacing pi-border-color" and <h3 class="pi-data-label pi-secondary-font"></h3>.

Alistair3149 (talkcontribs)

Ah I can see what happened, Citizen re-process the whole body content so that it can be separated into sections. The issue with PortableInfobox is that it puts the <p> element within heading elements such as <h3>. This is not valid in HTML5, so the <p> get separated from the <h3> element after Citizen parsed it.

The same issue can be reproduced with MobileFrontend, which used a similiar parser. https://www.croftmanor.it/index.php?title=Rise_of_the_Tomb_Raider&mobileaction=toggle_view_mobile&useskin=minerva

It is an upstream issue with PortableInfobox and there is not much I can do. I suggest filing the issue at PortableInfobox's issue tracker: https://github.com/Universal-Omega/PortableInfobox/issues

D0wnl04d3r97 (talkcontribs)

Is it possible tu use the default skin only for the Infobox? Just to test if everything is correct using Citizen theme.

Alistair3149 (talkcontribs)

No it is not possible. The skin controls the output of the whole page.

It seems that this issue might have be resolved in the latest version of PortableInfobox back in April, perhaps you can try updating it and see if it fixes the issue.

D0wnl04d3r97 (talkcontribs)

Now I have Citizen 2.13.5 but the problem is still there unfortunately. Just tried using other skins but they are fine, the alignment is correct. I don't know why using Citizen the alignment is all fucked up :/

Alistair3149 (talkcontribs)

As I explained above, Citizen (and MobileFrontend as well) did some transformation on the HTML to make collapsible sections. In that process, invalid HTML such as what PortableInfobox did are processed differently, causing the alignment issue.

You need to update PortableInfobox to the latest version (0.7), this bug might have been addressed recently.

Reply to "PortableInfobox glitches"