Titan Network

More Titan Projects => ParagonWiki => Formatting and Standardization => Topic started by: Blondeshell on January 03, 2013, 04:15:06 AM

Title: ISalvage template is broken
Post by: Blondeshell on January 03, 2013, 04:15:06 AM
I just noticed tonight that the {{ISalvage (http://paragonwiki.com/wiki/Template: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 (http://paragonwiki.com/wiki/Template:ISalvageImage)}}, but it appears to get into DPL usage, which is over my head.
Title: Re: ISalvage template is broken
Post by: eabrace 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.
Title: Re: ISalvage template is broken
Post by: Sekoia 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.
Title: Re: ISalvage template is broken
Post by: eabrace on January 04, 2013, 12:36:48 AM
Yay, Sekoia!
Title: Re: ISalvage template is broken
Post by: Blondeshell on January 04, 2013, 02:18:38 AM
That did the trick. Thanks!
Title: Re: ISalvage template is broken
Post by: Blondeshell 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?
Title: Re: ISalvage template is broken
Post by: Sekoia 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 (http://paragonwiki.com/wiki/Template: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 (http://paragonwiki.com/wiki/Template: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 (http://paragonwiki.com/wiki/Template:SMWStrip)}}).

I really wish DPL and SMW weren't so fragile. :(
Title: Re: ISalvage template is broken
Post by: Blondeshell on January 05, 2015, 02:29:27 AM
It may seem trite, but thanks for all you do! :)
Title: Re: ISalvage template is broken
Post by: Blondeshell 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 (http://paragonwiki.com/wiki/Template:BadgeBox)}} is also broken. :( Check Recluse's Victory (http://paragonwiki.com/wiki/Recluse%27s_Victory#Badges) for examples.

I'm reluctant to guess how many more of these problems we'll find.
Title: Re: ISalvage template is broken
Post by: Sekoia 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.