Template talk:Wikidata alignment
Appearance
Problem
[edit]@MSGJ: A lot of articles are in Category:Pages with script errors with a hidden error, for example Algoma Light and Boston Light. The error is "Lua error: Unmatched close-bracket at pattern character 27." I think the problem concerns recent edits here resulting in
{{#invoke:String|match|{{#invoke:wd|property|{{{qid|}}}|{{{property}}}}}|{{{equivalent|¬}}}|1|nomatch=}}
That boils down to
{{#invoke:String|match|wikidata_text|equivalent_text|1|nomatch=}}
I think the |1
is not doing anything useful. The problem is that |plain=true
is required for the articles with an error which have regex characters such as [ ]
in the text. Actually, is string|match
needed? Can't the strings be compared with #ifeq
? Johnuniq (talk) 06:59, 4 November 2021 (UTC)
- Thanks for note. I will look into this shortly. — Martin (MSGJ · talk) 07:55, 4 November 2021 (UTC)
- Yes, it's because the parameter has a wikilink, so I need to strip this somehow.
SettingI will continue looking. — Martin (MSGJ · talk) 10:36, 4 November 2021 (UTC)|ignore_errors=true
might be a quick fix. - I have used the {{delink}} template to strip out the square brackets. This seems to have fixed the errors. — Martin (MSGJ · talk) 15:12, 4 November 2021 (UTC)
- I'm not sure that a regex match would ever work reliably and I don't understand why it is needed. Anyway, these articles have problems which I imagine can be solved by cleaning the characteristic parameters:
- Old Orchard Shoal Light • characteristic = Fl W 6s (Red from 087 deg to 203 deg
- Vaindloo Lighthouse • characteristic = Fl W/R 15 s. (1+14=15 s.) [[File:Vaindloo red.gif|12px]][[File:Vaindloo white.gif|12px]]
- Vilsandi Lighthouse • characteristic = Fl(3) W/R 15 s. [[File:Vilsandi lighthouse red.gif|12px]][[File:Vislandi lighthouse white.gif|12px]]
- Johnuniq (talk) 09:03, 5 November 2021 (UTC)
- I'm not sure that a regex match would ever work reliably and I don't understand why it is needed. Anyway, these articles have problems which I imagine can be solved by cleaning the characteristic parameters: