Module:Submit an edit request: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
fix script error when the talk page doesn't exist
handle case where makeRequestUrl is called on a title that cannot have a talk page (special pages are an example); see edit request
Line 62:
return tostring(mw.uri.fullUrl(message('main-page-request-page')))
end
local talkPageName = resolveRedirect(titleObj.talkPageTitle.prefixedText)
if talkPageName == nil then
return tostring(mw.uri.fullUrl(message('protected-talk-page-request-page')))
end
talkPageName = resolveRedirect(talkPageName.prefixedText)
if isProtected(talkPageName) then
return tostring(mw.uri.fullUrl(message('protected-talk-page-request-page')))