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.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21f14be095bc6f8

Jump to content

Module talk:Legislationuk

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 1 year ago by Penguin1737 in topic Possible link to Wikisource

Lua errors in pages that use module...

[edit]

Hi DotCoder, I noticed a number of UK-related pages are now listed in Category:Pages with missing references list, and sampling them, I see Lua error in Module:Legislationuk at line 84: attempt to concatenate field '?' (a nil value). and errors about a missing {{reflist|group=infobox}}.

I'm guessing one of the recent edits messed something up. I tried debugging, but am not very familiar with Lua. Would you be able to take a look? = paul2520 💬 02:27, 19 September 2024 (UTC)Reply

This has since been resolved; for future reference, I had seen it happen on List of acts of the Parliament of the United Kingdom from 1835 and other pages. = paul2520 💬 22:10, 3 October 2024 (UTC)Reply
[edit]

I haven't edited lua modules before, but I was looking on how this might link to wikisource for the acts we've been transcribing at Wikiproject UK Law.

If the parameter "wikisource" was added:
local wikisource = args[ "wikisource" ] or ""
after line 57

And then the link was setup as:
if wikisource == "y" then
local url = "https://en.wikisource.org/" .. legShortTitle
o = o .. "Act Text"
end

after line 107

Would there be any other code needing changed to add a Wikisource link? I'm not sure I understand the other logic regarding the formatting on line 77-81 and 90 and if there are any needs to incorporate the new parameter. Penguin1737 (talk) 01:57, 15 May 2025 (UTC)Reply

Some other stuff was needed, but this functionality has been added. Let me know if there are any issues with this! Penguin1737 (talk) 23:10, 12 June 2025 (UTC)Reply