From da33ad0a7cc76e62d32cadfdd738192f2e059a37 Mon Sep 17 00:00:00 2001 From: mbergen Date: Fri, 18 Oct 2024 16:06:32 +0200 Subject: [PATCH] fix(match2): Display input for unknown maps, log missing map on AoE (#4910) --- .../match2/wikis/ageofempires/match_group_input_custom.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/match2/wikis/ageofempires/match_group_input_custom.lua b/components/match2/wikis/ageofempires/match_group_input_custom.lua index 7d67ae63ea5..7a594839a6d 100644 --- a/components/match2/wikis/ageofempires/match_group_input_custom.lua +++ b/components/match2/wikis/ageofempires/match_group_input_custom.lua @@ -277,7 +277,12 @@ function CustomMatchGroupInput._getMapName(map, mapsInfo) ---@cast mapsInfo -nil local info = Array.find(mapsInfo, function(m) return m.name == map.map or m.link == map.map - end) or {} + end) + if not info then + mw.ext.TeamLiquidIntegration.add_category('Pages with maps missing in infobox') + mw.logObject('Missing map: ' .. map.map) + return mw.ext.TeamLiquidIntegration.resolve_redirect(map.map or ''), map.map + end return info.link, info.name end