At Template:Toolbar/testcases and Template:3x/testcases test cases fail with this backtrace:
Backtrace: [C]: in function "sort" Module:Template_invocation:107: ? (tail call): ? Module:Template_test_case:140: in function "getInvocation" Module:Template_test_case:642: in function "?" Module:Template_test_case:663: ? [C]: in function "tostring" Module:Template_test_case:786: ? (tail call): ? mw.lua:518: ? [C]: ?
The issue seems to be caused by template invocation, in which a positional parameter is {{=}}
and at least one named parameter is present. I've added test14_equals_sign_parameter
to
Module:Template test case/testcases to demonstrate the issue. —
andrybak (
talk) 14:25, 19 May 2020 (UTC)
1=foo=bar
was passed to the template::: if type(v) == 'string' and v:find('=', 1, true) then
:: -- Likely something like 1=foo=bar, we need to do it as a named arg
:: break
:: end
::
The code seems somewhat broken to me. I would fix it but omg it's used in so many places and I haven't got a clue why it is invoked in articles. For a lol, see Module talk:Template invocation/testcases which apparently has been displaying "Error: attempt to compare string with number" for a long time. Johnuniq ( talk) 03:42, 20 May 2020 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The module is currently producing " editor-hostile wikitext" by not adding spaces between the parameters. Please add a space at line Module:Template_invocation#L-116:
ret[#ret + 1] = ' ' .. seps.pipe
(an alternative solution by changing pipe = '|',
to pipe = ' |',
at
Module:Template_invocation#L-81 would probably be less robust, since pipe
is used for unnamed parameters as well, but some such templates don't trim whitespace from their arguments). —
Mikhail Ryazanov (
talk) 20:56, 9 February 2024 (UTC)
At Template:Toolbar/testcases and Template:3x/testcases test cases fail with this backtrace:
Backtrace: [C]: in function "sort" Module:Template_invocation:107: ? (tail call): ? Module:Template_test_case:140: in function "getInvocation" Module:Template_test_case:642: in function "?" Module:Template_test_case:663: ? [C]: in function "tostring" Module:Template_test_case:786: ? (tail call): ? mw.lua:518: ? [C]: ?
The issue seems to be caused by template invocation, in which a positional parameter is {{=}}
and at least one named parameter is present. I've added test14_equals_sign_parameter
to
Module:Template test case/testcases to demonstrate the issue. —
andrybak (
talk) 14:25, 19 May 2020 (UTC)
1=foo=bar
was passed to the template::: if type(v) == 'string' and v:find('=', 1, true) then
:: -- Likely something like 1=foo=bar, we need to do it as a named arg
:: break
:: end
::
The code seems somewhat broken to me. I would fix it but omg it's used in so many places and I haven't got a clue why it is invoked in articles. For a lol, see Module talk:Template invocation/testcases which apparently has been displaying "Error: attempt to compare string with number" for a long time. Johnuniq ( talk) 03:42, 20 May 2020 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The module is currently producing " editor-hostile wikitext" by not adding spaces between the parameters. Please add a space at line Module:Template_invocation#L-116:
ret[#ret + 1] = ' ' .. seps.pipe
(an alternative solution by changing pipe = '|',
to pipe = ' |',
at
Module:Template_invocation#L-81 would probably be less robust, since pipe
is used for unnamed parameters as well, but some such templates don't trim whitespace from their arguments). —
Mikhail Ryazanov (
talk) 20:56, 9 February 2024 (UTC)