Author Topic: Briefing Box Tweaks  (Read 2747 times)

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
Briefing Box Tweaks
« on: February 05, 2011, 06:22:06 AM »
Looks like something related to some recent template changes might have had some unintended consequences.

Sera404 brought to my attention a graphical issue with Mender Ramiel.

I didn't see any issues at first, so I switched from Firefox to IE.  I think that this is the issue we're talking about:



I'm noticing that the Mission Briefing template changed a couple of days ago.  Any idea if these changes might have something to do with the issue?
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
Re: Briefing Box Tweaks
« Reply #1 on: February 05, 2011, 06:57:59 AM »
I stand corrected.  The problem Sera404 was talking about was further down in the article.  I was looking at the wrong part about Trapdoor.

Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Sekoia

  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 1,848
Re: Briefing Box Tweaks
« Reply #2 on: February 05, 2011, 07:06:11 AM »
It took a while, but I isolated at least one problem to this syntax:

Code: [Select]
:{{Mission Clue|Name=Dummy|Text=Dummy}}
That will break the page. Take away the colon and it works. I have a demo at http://paragonwiki.com/wiki/User:Sekoia/Sandbox/Four (you can see that it's broken by checking the "user page", "discussion", etc links at the top; edit, remove the colon, and preview to see that it fixes it).

I removed the colon in Ramiel's article. However, the page is still wonky, so something else is still out of whack.

EDIT: Actually, there was another instance of that problem in the page, plus it looks like Guy found and unrelated problem. The page now appears to render properly.

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
Re: Briefing Box Tweaks
« Reply #3 on: February 05, 2011, 07:09:49 AM »
Ha!

You, Guy, and I were all looking for it and it looks like we all found it at just about the same time.  :)
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Sekoia

  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 1,848
Re: Briefing Box Tweaks
« Reply #4 on: February 05, 2011, 05:38:20 PM »
Here's why it breaks. When it transcludes the {{Mission Clue}} template, the first few lines are:

Code: [Select]
<div style="margin: 0.5em;">
{|style="background-color: #F4F4F4; border: 1px solid #AAAAAA;"

Since we have a colon in the front, we then get this:

Code: [Select]
:<div style="margin: 0.5em;">
{|style="background-color: #F4F4F4; border: 1px solid #AAAAAA;"

The colon only is intended to be used on single lines. So the above turns into this html code:

Code: [Select]
<dl><dd><div style="margin: 0.5em;">
</dd></dl>
<table style="background-color: #F4F4F4; border: 1px solid #AAAAAA;">

So it opens DL, DD, and DIV, then closes DD before the DIV gets closed. That's invalid HTML and that's where everything gets screwed up.

There's not really any way for us to make the template work with a colon, and we'll likely find that any other template with multiple lines will break the same way if used with the colon. To work around this defect, I've added {{Indent}}, which works on multi-line input.