Author Topic: ISalvage template is broken  (Read 10756 times)

Blondeshell

  • Elite Boss
  • *****
  • Posts: 791
ISalvage template is broken
« on: January 03, 2013, 04:15:06 AM »
I just noticed tonight that the {{ISalvage}} template shows a question mark image for invention salvage pieces that have a disambig page. The salvage that seem to be impacted by this are Clockwork Gear, Brass, Destiny, Hamidon Goo, Impervium, and Rune. I can get the image to show properly if the parameter is listed as "Rune Salvage," for example, but it then creates a red-link to "Rune Salvage Salvage." I think the problem might actually be in {{ISalvageImage}}, but it appears to get into DPL usage, which is over my head.
« Last Edit: January 03, 2013, 11:35:42 PM by Blondeshell »

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,230
Re: ISalvage template is broken
« Reply #1 on: January 03, 2013, 11:52:54 PM »
Hmm.  I haven't tinkered with anything DPL since we changed over to... whatever that new scripting language was that we changed to.  If I get a chance, I'll take a look tonight or tomorrow.
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,828
Re: ISalvage template is broken
« Reply #2 on: January 04, 2013, 12:21:18 AM »
It was a SMW issue instead of a DPL issue. :)

It was looking at "Rune" for an image instead of "Rune Salvage". That works for most salvages since most of them have redirects (Fortune -> Fortune Salvage). But it fails for items with disambigs because there's no image defined on the disambig page. I fixed it to do the correct thing: look directly at the salvage page.

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,230
Re: ISalvage template is broken
« Reply #3 on: January 04, 2013, 12:36:48 AM »
Yay, Sekoia!
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

Blondeshell

  • Elite Boss
  • *****
  • Posts: 791
Re: ISalvage template is broken
« Reply #4 on: January 04, 2013, 02:18:38 AM »
That did the trick. Thanks!

Blondeshell

  • Elite Boss
  • *****
  • Posts: 791
Re: ISalvage template is broken
« Reply #5 on: January 02, 2015, 09:40:37 PM »
<SuperNecro!>

It appears this has become an issue again. Is it possible that the recent upgrade to the MediaWiki software had anything to do with it?

Sekoia

  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 1,828
Re: ISalvage template is broken
« Reply #6 on: January 04, 2015, 08:46:47 PM »
TL;DR: Yes, the recent upgrade was likely the culprit. It's now fixed.

Longer answer: What a three-ring circus!

Once again, the problem was in {{ISalvageImage}}. For some reason, the {{#show}} parser function just was not working correctly. I finally gave up trying to get it to work and used the {{#ask}} parser function instead. Unfortunately, using #ask is a lot more complicated than #show. I had to create a helper template to "echo" the wanted value ({SMWEcho}}). And then it still wasn't working because now apparently SMW adds extra [[SMW::on]] and [[SMW::off]] cruft. So then I had to add a helper function to strip that cruft off as well ({{SMWStrip}}).

I really wish DPL and SMW weren't so fragile. :(

Blondeshell

  • Elite Boss
  • *****
  • Posts: 791
Re: ISalvage template is broken
« Reply #7 on: January 05, 2015, 02:29:27 AM »
It may seem trite, but thanks for all you do! :)

Blondeshell

  • Elite Boss
  • *****
  • Posts: 791
Re: ISalvage template is broken
« Reply #8 on: January 10, 2015, 01:29:12 AM »
I really wish DPL and SMW weren't so fragile. :(

Then you probably don't want me to mention that {{BadgeBox}} is also broken. :( Check Recluse's Victory for examples.

I'm reluctant to guess how many more of these problems we'll find.

Sekoia

  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 1,828
Re: ISalvage template is broken
« Reply #9 on: January 12, 2015, 09:26:43 PM »
 :'(  :gonk:  :'(  :gonk:  :'(

BadgeBox is fixed now. I imagine there are a few more floating around... keep posting them as you find them. Now that I have a sense for how to work around the issue, it won't take as long to fix each one as they show up.