STO Awakening.jpg

Talk:"The Impaler"

From Star Trek Online Wiki
Jump to: navigation, search

@User:Damixon {{Icon}} appears to give an error here:

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: SELECT `rarity` AS `rarity` FROM `cargo__Rarity` WHERE _pageName=""The Impaler"" GROUP BY `_pageName` ORDER BY `rarity` LIMIT 100 Function: CargoSQLQuery::run Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'The Impaler"" GROUP BY `_pageName` ORDER BY `rarity` LIMIT 100' at line 1 (

I think this is because the name of the item has double quotes, as I checked the cargo table and the item appears to be there at the top: Special:CargoTables/Rarity. I have checked Icon template, and it appears to attempt to compensate for this, but this isn't enough, any ideas?


I know we could add an explicit |Epic parameter to suppress cargo query (it has been added but at the incorrect position, causing the query to run), however would be nice to fix the template so it is able to generically handle any item name with double quotes.

Trajos (talk) 17:49, 5 December 2019 (UTC)

Rarity is {{{3}}} parameter for icon template so I added "|" before Epic and it fixed a red text error. I further played with the {{Icon}} template and this is what I discovered. It seams {{icon|{{PAGENAME}}|Epic}} will show the cargo red text error, but if you replace the {{PAGENAME}} with full item name, like this: {{icon|"The Impaler"|Epic}} - it shows the rarity correctly. Note that Epic in this case doesn't do anything because it is missing "|" - only reason why you see epic rarity border on that icon is because it pulls that info from data added via {{infobox}}, so either add "||", or don't add rarity at all (you can't adjust rarity with only |Epic because rarity is not {{{2}}} parameter). But, as you noticed, {{icon|{{PAGENAME}}|Epic}} will add red text error only on pages with double quotes, but since it is missing a "|", I don't think adjustments are necessary. Above you mentioned Epic was added at incorrect position, so I'm probably repeating what you already know - oOeyes would need to jump in to fix this, I don't know how to do it. --Damixon (talk) 19:01, 5 December 2019 (UTC)