ISalvage template is broken

Started by Blondeshell, January 03, 2013, 04:15:06 AM

Blondeshell

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.

eabrace

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

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 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

<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

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

It may seem trite, but thanks for all you do! :)

Blondeshell

Quote from: Sekoia on January 04, 2015, 08:46:47 PM
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

 :'(  :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.