Changes
replace remaining "title" variables with "self.title"
self.name = args.name
local nameTitle = getTitleObject(name)
self.isTemplatePage = nameTitle and self.title.prefixedText == ('Template:' .. nameTitle.text) and true or false
-- Get the self.issue value.
-- If we couldn't process the talk page link, get the talk page of the current page.
local success
success, talkTitle = pcall(self.title.talkPageTitle, self.title)
if not success then
talkTitle = nil
-- Add template-namespace categories.
self.isTemplatePage = type(self.name) == 'string' and self.title.prefixedText == ('Template:' .. self.name)
if cfg.templateCategory then
if self.name then
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif type(self.name) == 'string' and self.title.prefixedText == ('Template:' .. name) then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
-- Categories for all namespaces.
if self.invalidType then
local allSort = (nsid == 0 and 'Main:' or '') .. self. title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
end