Topic on Project:Support desk

Infobox thumbnail image shows image code

7
LeyteWolfer (talkcontribs)
  • Mediawiki: 1.29.1
  • PHP: 5.6.22 (cgi-fcgi)
  • Database: MySQL 5.6.35

I have two private wikis, handling different sci-fi 'verses. In one, I've always used a medium blue background around images in the sidebar/infobox, and it's worked fine. On the other, the medium blue was a pure black (#000000) and also worked fine, until I decided to make it a light grey. I've noted that the image displays just fine, but the image code ([[Image: and |191px]]) bracket the displayed image. I waited a bit (hours) and noticed the problem still occurred. I tried different colors before reverting back to black. However, I realized the black was simply masking the text code.

The same issue is not true on my other wiki. I'm presuming this is a Common.css issue, but I cannot figure out where. What might be causing the image code to show?

MarkAHershberger (talkcontribs)

This doesn't sound like a CSS issue.

What is the wikitext you're using to set up the infobox? Is it different on the two wikis?

What about the infobox template? Is it exactly the same on both wikis?

LeyteWolfer (talkcontribs)

I'm unclear by what you mean by wikitext. Are you referring to the text that calls and populates the infobox? If you had not directly asked about the infobox template, I would have responded with info about the infobox, but it's clear you are referencing two different things; I'm not sure what the difference is.

As for the second: the infoboxes are different, but behave similarly. For example, the abbreviated (and suspect) infobox is:

{{InfoBoxBattleMech
|image=[[File:Crab (MWO).png|150px|'''CRB-27 Crab''']]
|name= CRB-27 Crab
|role= [[Skirmisher]]
|mass= 50
|chassis= Hollis Mark</nowiki>
|}

The functioning infobox is:

{{Sidebar Guide ship
|image=[[File:Murmansk (stbd).png|250px|''Murmansk'' class heavy transport]]
|classname= ''Murmansk''
|category= heavy transport/command ship/cultural exchange ship
|years= [[2167]]-[[2189]]
|constructed= 13
|length= 250.0 m
|beam= 51.5 m
|height= 43.7 m
|mass= 101,000 tons
|}

AhmadF.Cheema (talkcontribs)

At this point the most likely issue appears to be some typo or mistake in the template code. It is difficult to make sure without access to the code. Can you provide it?

LeyteWolfer (talkcontribs)

Absolutely. Thank you. (It can be seen in it's raw form by editing my post.)

name
Role
Mass tons
Chassis
Power Plant
Cruising Speed km/h
Maximum Speed km/h
Armor
Armament

Manufacturer

Production information
Introduced

Battle Value II

Production Cost C-Bills
AhmadF.Cheema (talkcontribs)

The problem is that in your template code you have already used the syntax needed to insert the image and defined its pixel size, [[Image:{{{image}}}|191px]]. When you call your infobox template, you re-use the "syntax needed to insert the image and define its pixel size" ([[File:Crab (MWO).png|150px|'''CRB-27 Crab''']]). Note that here [[File:Foo.png]] and [[Image:Foo.png]] are the same.

Therefore, you need to either remove from the template code [[Image:{{{image}}}|191px]] and replace it with just {{{image}}}, OR in your code used to call the infobox template, you need to only write the filename (Crab (MWO).png).

LeyteWolfer (talkcontribs)

Thank you, AhmadF.Cheema. That explanation was understandable and you were right. I ended up removing the code from the template.