Template talk:Cargo location quests

I noticed that this where clause used previously: where = locations__full LIKE "%%" Matches the parameter passed to this template with any substring of the locations list as a whole, and not just the individual location strings in the list. This was causing the query to return quests where only a substring of the locations matched the parameter, meaning the location "Storm", would match to the quest "The Assassin at Large", because one of the locations in that quest is "Stormwall Gorge". I believe this is not the intended result, so I've corrected the query to use HOLDS: where = locations HOLDS "" This will return a list of the quests where any single element in the locations list is equal verbatim to the parameter passed to the template. Although HOLDS LIKE is supported, I don't think it should be used in this instance, since this would result in cases like the one described above.

Feel free to undo this if it causes any hassles. In testing it seems to not affect existing pages/templates in any ways other than described.

—Ujm18 (talk) 14:44, 3 September 2018 (UTC)


 * Heya Macklin, i've seen some difficulties with this fix too. Because there are sometimes pages that use extensions like (Deadfire) ...
 * So am trying to see if it tries to grab the name by using pagename nd. Arawn76 (talk) 15:38, 22 December 2018 (UTC)


 * I thought of this when I made this change a while ago, but I dismissed it, as I don't know of any location pages that use a disambig suffix + alias (like ) and are commonly used. Minor locations like generic buildings may have this, they probably shouldn't be used in the locations field for quests. If you can find me an example of where this problem exists, let me know and I'll have a closer look. Macklin (talk) 16:18, 22 December 2018 (UTC)

Page examples are: Ice cave is the map name. So inventing any other name is wrong. Hope it helps Arawn76 (talk) 23:57, 22 December 2018 (UTC)
 * https://pillarsofeternity.gamepedia.com/Ice_Cave_(Durgan's_Battery) => quest: https://pillarsofeternity.gamepedia.com/Sacred_Instruments
 * https://pillarsofeternity.gamepedia.com/Ice_Cave_(Longwatch_Falls) => quest: https://pillarsofeternity.gamepedia.com/His_Better_Half
 * https://pillarsofeternity.gamepedia.com/Ice_Cave_(Russetwood) => quest: https://pillarsofeternity.gamepedia.com/The_Hunter%27s_Favor

Other examples: >This is part of a disambig page, so the combination mapname + (main_location name) should be fine because you can blend them (content) out with pagename nd Arawn76 (talk) 00:45, 23 December 2018 (UTC)
 * https://pillarsofeternity.gamepedia.com/Temple_of_Berath_(Dyrford_Village) => quest: https://pillarsofeternity.gamepedia.com/Through_Death%27s_Gate
 * https://pillarsofeternity.gamepedia.com/Temple_of_Berath_(Neketaka) => quest: https://pillarsofeternity.gamepedia.com/Eulogy_for_the_Dead
 * Ah I see what you mean, taking the last example Eulogy for the Dead uses a link + link text to list Temple of Berath as a location in that quest, but this template doesn't find that quest page because it's looking for the exact text "Temple of Berath (Neketaka)". Checking for "Temple of Berath" itself won't work because then we'll get quests across both multiple locations.


 * In this case, the template has to look for the full name plus custom title together, e.g., as well as instances where editors decide not to add a title to the link. Also, we need to consider if the editor decides to put in anything other than the "Pagename nd" as the link text, e.g.


 * So to cover these conditions, I can change the query to
 * Match an element in Quest_poe1.locations with the location page name exactly (as is currently)
 * Match with page name exactly + '|' + %. Which will match any case where a pipe is used with the full name.


 * Unfortunately using multiple HOLDS in cargo queries breaks the query, so I'll have to add another query entirely.
 * Alright, I added this fix - and also had to change Template:Infobox location to use pagename instead of pagename nd for the Cargo location quests lookup. This itself may break things, but I can't imagine any cases where it will, but just keep an eye out for any issues with this. Macklin (talk) 06:03, 23 December 2018 (UTC)

Yes i see. It's not adding A Lovely Drop Somehow i think we put to many templates into the infoboxes. Should we turn the edits back? And remove the questinfo on the infoboxes? I mean i write so or so a topic about

Related Quests
on the pages This simplifies all a bit. Arawn76 (talk) 21:17, 26 December 2018 (UTC)
 * I think you have it backwards, with this template you input a location, and it outputs all the quests that involve that location. To do this it searches the Quests cargo table in the locations field for the location that was passed to the template. In your example you're inputting a quest, not a location - so naturally it won't generate any results. This template is mainly used in location pages as part of the infobox, so that we don't have to keep a list of quests for each location. I don't know of any uses of a template that does the opposite (where you input a quest, and it outputs all the locations for that quest), since that data is already present on the quest page, and can be retrieved with a cargo query. Macklin (talk) 05:59, 27 December 2018 (UTC)