Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template talk:Wikidata alignment

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 15 days ago by Bb010g in topic Feature request: Sort key parameter

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)Reply

Thanks for note. I will look into this shortly.  Martin (MSGJ · talk) 07:55, 4 November 2021 (UTC)Reply
Yes, it's because the parameter has a wikilink, so I need to strip this somehow. Setting |ignore_errors=true might be a quick fix. I will continue looking.  Martin (MSGJ · talk) 10:36, 4 November 2021 (UTC)Reply
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)Reply
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)Reply

Feature request: Sort key parameter

[edit]

@MSGJ Could you add an optional parameter that specifies a sort key to use in automatic categorization? bb010g (talk) 08:55, 15 July 2026 (UTC)Reply