Troubleshooting

From Lolitics Wiki
Jump to navigationJump to search

The wiki has a few recurring problems. Some are due to bugs in the MediaWiki code, some are due to bugs in our code, some are just fate. Here's how to solve them.

"Why this?"

Infoboxes[edit | edit source]

Grey Headers[edit | edit source]

I'm writing a page for a Lib Dem but the infobox is all grey! What's wrong?

The colour parser is really picky and only recognises certain standard spellings, which are:

"Labour"
"Conservative"
"Liberal Democrat"
"SDP"
"Liberal"
"SNP"
"Ukip"
"Green"

It has to be that exact word/phrase/abbreviation with that capitalisation, or it won't work.

Politicians with Multiple Parties[edit | edit source]

Douglas Carswell used to be a Tory, but now he's Ukip. What should I write for "party"?

The infoboxes depend on the "party" parameter to get their header colours, and as explained above, any deviation from the standard will give you a grey infobox. However, there's a secret "parties" parameter that you can add to account for wandering loyalties. You have to keep the "party" parameter because the headers need it, but if you put in "parties" it will override "party" in the text.

Thus,

|party = Ukip
|parties = Ukip (2014 - present)<br> Conservative (? - 2014)

will keep Douglas's infobox nice and purple while displaying his full party history.

Hack Companies[edit | edit source]

I put in BBC for Hacky McJournalist's company but his infobox is all grey! What gives?

Like the party colour parser, the media colour parser is incredibly anal and you have to get the company name exactly right. Unlike the party colour parser, the chosen names are pretty arbitrary. They are:

"The BBC"
"Sky News"
"Channel 4"
"The Guardian"
"The Times"
"The Daily Mail"
"The Independent"
"The Telegraph"
"The Sun"

(All the News International people get assigned to "The Sun" even if they never worked there; it's a shorthand.)

There's a "companies" parameter that will override the "company" parameter; use this if you want to link to the newspaper or write "News International" for their company or they've worked for two companies or you feel passionately that "Channel 4" should be "Channel 4 News".

Images[edit | edit source]

Scaling Infobox Portraits[edit | edit source]

My infobox portrait has resized in a stupid way and now it looks terrible!

The infobox portraits have default scaling values hardcoded in. Mostly this is a convenient time-saver and keeps everything looking tidy. Sometimes it looks terrible. (Likely sources of terribleness: your image is smaller than 250x300px and enlarging it makes it blurry, your image is wider than it is tall and it looks too small when confined to the standard dimensions, your image hates you and looks pixellated and horrible at 250x300px even though it is gorgeous at 249x299px and 251x301px.)

The infobox has a secret parameter that allows you to override the default scaling. Just add a line that looks like this:

|image size  = [width]x[height]px

with some better image size. (You probably won't want to get wider than 300px, or it will get too close to the infobox margins and it will look weird.)

OTPlessness[edit | edit source]

There are no pictures of my OTP together! What do I do for their ship manifesto portrait?

This is actually a fairly common problem (see Attison, Brycow) and we're set up to deal with it.

Change the "image" parameter in the infobox to "image 1", stick in an "image 2" line, and link to individual portraits of your OTP, like so:

|image 1  = OTP.Person1.jpg
|image 2  = OTP.Person2.jpg

The infobox will set up a gallery containing the two (or three, or four, or five- you can do this for multiple people) images, and you'll be all set.

Fair warning: The gallery will scale all the pictures to the same height, but it looks pretty weird and unromantic if their heads are completely different sizes. You may have to spend a while trimming your portraits to the right dimensions and re-uploading them in order to get the shippy look you're going for.

Floating Images Getting Stuck[edit | edit source]

My politician baby pic is trapped below the infobox and it's screwing up the formatting for the whole article!

Floating objects are supposed to stack horizontally in CSS, so that a right-floated object created immediately after another right-floated object will float happily on its inside, to the right of the text and to the left of Right-Floating Object Number 1.

For reasons known only to Satan, the floating functionality on MediaWiki images is partially broken and they don't stack.

Mostly this doesn't affect us, but it means that images you float right near the top of an article with an infobox (for instance, baby pics in a politician's childhood section) will get stuck beneath the infobox instead of floating to its left like they're supposed to, marooning them further down the article in an unrelated section and messing up the formatting for all the other images.

Fortunately, we've written a wrapper to solve this problem. Just pop your image in a Floatbox and you're good to go.

{{Floatbox|[[File:Politican_Name.BabyPic.jpg|thumb|none|200x200px|Ickle baby!]]|right}}

The first parameter is the image. You'll want to specify "none" on the horizontal alignment so it will be centered in the Floatbox. The second parameter tells the Floatbox whether to float on the left or the right (although it's unlikely you'll ever need to float it on the left).

Wrong Size Images in Page[edit | edit source]

My picture won't resize even though I'm telling it to!

If using "frame" to decide size, change to "thumb" - that seems to work at the moment.

Quotes and Quoteboxes[edit | edit source]

{{{1}}}[edit | edit source]

Equal signs make templates with unnamed parameters confused. When you try to pass Quotebox a quote with text or CSS formatting involving a "=", you get

{{{1}}}

and Quote will just ignore the whole parameter that contained the "=".

The solution is to number the parameters.

{{Quotebox|<span style="color:purple;">Nope!</span>}}

will give you

{{{1}}}

but

{{Quotebox|1=<span style="color:purple;">Yep!</span>}}

will give you

Yep!

To fix Quote, you need to number parameters 1 and 2:

{{Quote|1=<span style="color:purple;">Lolitics</span> is the art of the improbable.|2=Anon}}

Lolitics is the art of the improbable.~ Anon