Difference between revisions of "Module:TNT"

Jump to navigation Jump to search
242 bytes added ,  11:15, 27 November 2019
Give a more useful error message if jsonconfig is missing. There have been three questions about this on the support desk from third party folks copying this template.
>DannyS712
m (Protected "Module:TNT": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only administrators] (indefinite)))
>Bawolff
(Give a more useful error message if jsonconfig is missing. There have been three questions about this on the support desk from third party folks copying this template.)
Line 153: Line 153:
if not dataset then
if not dataset then
error(formatMessage(i18nDataset, 'error_no_dataset', {}))
error(formatMessage(i18nDataset, 'error_no_dataset', {}))
end
-- Give helpful error to thirdparties who try and copy this module.
if not mw.ext or not mw.ext.data or not mw.ext.data.get then
error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset)
end
end


Anonymous user

Navigation menu