Template talk:Cite German law

(Redirected from Template talk:Cite German law/testcases)
Latest comment: 7 years ago by RobbieIanMorrison in topic Buggy code with pages parameter set

Buggy code with pages parameter set

edit

Take the following code with the |pages= field set:

{{cite German law
 | link = 
 | art = 
 | para = 111d
 | date = 13 October 2016
 | en = Energy Industry Act
 | enab = 
 | de = Energiewirtschaftsgesetz
 | deab = EnWG
 | year = 
 | part = 
 | pages = 115–116
 | url = https://www.destatis.de/DE/Methoden/Rechtsgrundlagen/Statistikbereiche/Inhalte/251_EnWG.pdf
}}

This displays as follows:

§ 111d Energiewirtschaftsgesetz (EnWG) [Energy Industry Act] of 13 October 2016, BGBl. Expression error: Missing operand for =. Part , p. 115–116

The problem evaporates when the |pages= field in not used. Some experimentation reveals that the following code is possibly at fault:

{{#ifexpr: {{{DateYear|-1}}} = {{{Year|0}}} | | {{{Year}}}, }}

Hopefully this bug can be sorted out. Best wishes. RobbieIanMorrison (talk) 11:16, 1 December 2016 (UTC)Reply

This error message is explained at mw:Help:Extension:ParserFunctions#.23expr. The following code will generate that error: {{#expr: 1 = }}. But I cannot see what is wrong with the original code above. Hopefully someone else will. RobbieIanMorrison (talk) 22:47, 8 December 2016 (UTC)Reply

Support for access-date parameter

edit

Give that the |url= field is supported, so also should the associated |access-date= field be supported. Can someone add this? Best wishes. RobbieIanMorrison (talk) 11:18, 1 December 2016 (UTC)Reply

Documentation for the pages parameter

edit

The usage of the |pages= field should be documented. Best wishes. RobbieIanMorrison (talk) 11:23, 1 December 2016 (UTC)Reply