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: a222629a3d23a691

Jump to content

Template talk:Copied

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Copied/sandbox)
Latest comment: 1 month ago by Paine Ellsworth in topic And/or

Template-protected edit request on 21 July 2025 fix broken wikitext in wikipedia talk namespace

[edit]

Please apply Special:Diff/1301656057.

This fixes the talk page link being broken wikitext on the page Wikipedia talk:Hatnote. I did this by using the proper properties of mw:Extension:Scribunto/Lua_reference_manual#Title_objects instead of messing with strings. 174.138.212.166 (talk) 01:36, 21 July 2025 (UTC)Reply

 Done with a small change so that Template:Merged-from isn't left displaying a lua error. Aidan9382 (talk) 07:37, 21 July 2025 (UTC)Reply

Bug report

[edit]

The diff link fails to parse in Talk:List of Genshin Impact characters. SuperGrey (talk) 12:26, 4 November 2025 (UTC)Reply

|diff= is used for providing an exact url to a diff, and |to_diff=/|to_oldid= are used for providing IDs for the module to automatically make the link with, and those won't be used if |diff= is specified. I've simply removed those parameters since this template doesn't seem to have a parameter for "edit that removed the copied content from the other page". Aidan9382 (talk) 12:48, 4 November 2025 (UTC)Reply
Thanks for explanation! SuperGrey (talk) 12:52, 4 November 2025 (UTC)Reply

Edit request, 28 February 2026

[edit]

Please make the changes below to the code of this template's module. This will ensure that text in the template will display properly when it is set to collapse. See this talk page to view the implemented fix, I've temporarily set it to use the sandbox; compare it with this earlier version of the same page, where you can see the display issue.

You can also copypaste from the sandbox if it's easier. Newbzy (talk) 07:18, 28 February 2026 (UTC)Reply

collapsedText = '<table style="width:100%%; background: transparent;" class="mw-collapsible mw-collapsed">\n<tr><th>Merged pages:</th></tr>\n<tr><td> %s </td></tr></table>' else collapsedText = '<table style="width:100%%; background: transparent;" class="mw-collapsible mw-collapsed">\n<tr><th>Copied pages:</th></tr>\n<tr><td> %s </td></tr></table>'
+
collapsedText = '<table style="width:100%%; background: transparent; color: inherit !important;" class="mw-collapsible mw-collapsed">\n<tr><th><span style="color: inherit !important;">Merged pages:</span></th></tr>\n<tr><td style="color: inherit !important;"> %s </td></tr></table>' else collapsedText = '<table style="width:100%%; background: transparent; color: inherit !important;" class="mw-collapsible mw-collapsed">\n<tr><th><span style="color: inherit !important;">Copied pages:</span></th></tr>\n<tr><td style="color: inherit !important;"> %s </td></tr></table>'
I don't see a difference on my computer between the [earlier version] and your [sandbox fix]. What exactly is it that this edit fixes? Could this be a browser issue? I use Chrome on a Windows platform. (I also wondered about that in connection with the dark mode issue you asked about earlier on my talk page.) P.I. Ellsworth, ed.  welcome!  12:08, 28 February 2026 (UTC)Reply
I'm using Edge on a Windows 11 laptop, but I tried installing Chrome and I still have the problem. This is so strange... I have fixed dark mode colouring before, notably on this requested edit to {{refideas}} and for a lot of the Featured list pages.
I'm just speculating here, but it is possible you have some common.js/common.css code fixing it for you, or have some Wikipedia extension (or third-party program) modifying pages that you view? Newbzy (talk) 12:25, 28 February 2026 (UTC)Reply
Yes that's possible. So does this mean that you also use Google Chrome browser in Windows? or do you use a different browser or possibly a different platform? P.I. Ellsworth, ed.  welcome!  12:30, 28 February 2026 (UTC)Reply
Nope, this is a new laptop and I'd turned over completely to Microsoft Edge some time ago on my old laptop (better RAM efficiency than Chrome, or so I've heard). I only just installed Chrome within the hour to test if the dark mode issues aren't present on that browser, but there's no difference for me.
I also tried your common.css and it's pretty cool... safe to say it doesn't seem to be what's causing the difference in what we're seeing. Newbzy (talk) 13:04, 28 February 2026 (UTC)Reply
It is required that both background and color is present for the dark mode. But why inherit and important? Can you be sure what the table inherits from? And also why you set td to inherit color from tr, when tr doesn't seem to have color? Nux (talk) 12:30, 28 February 2026 (UTC)Reply
Well, to run you through the steps I took to achieve this code alteration, I first fixed the colour of the heading and the text that appears when the template is collapsed. The code changes up to that point:
collapsedText = '<table style="width:100%%; background: transparent;" class="mw-collapsible mw-collapsed">\n<tr><th>Merged pages:</th></tr>\n<tr><td> %s </td></tr></table>' else collapsedText = '<table style="width:100%%; background: transparent;" class="mw-collapsible mw-collapsed">\n<tr><th>Copied pages:</th></tr>\n<tr><td> %s </td></tr></table>'
+
collapsedText = '<table style="width:100%%; background: transparent; color: inherit !important;" class="mw-collapsible mw-collapsed">\n<tr><th style="color: inherit !important;">Merged pages:</th></tr>\n<tr><td style="color: inherit !important;"> %s </td></tr></table>' else collapsedText = '<table style="width:100%%; background: transparent; color: inherit !important;" class="mw-collapsible mw-collapsed">\n<tr><th style="color: inherit !important;">Copied pages:</th></tr>\n<tr><td style="color: inherit !important;"> %s </td></tr></table>'
But then I realised that the [show] button was having problems, it was going white like the rest of the text even though, one, it was displaying properly already, and two, it needed to retain blue colouring for the actual "show" text. To fix that, I excluded the ".mw-collapsible" toggle from inheriting by wrapping only the heading text in a span that inherits colour, instead of the whole "<th>".
Also, could you please tell us, is the display issue occurring for you in your UI? Take a look at the template on this page, before and after. Newbzy (talk) 12:53, 28 February 2026 (UTC)Reply
@Newbzy Yes, I do see the problem on the collapsed testcase. I'm just not sure if you really need important there, it shouldn't be needed. Did you check if all of the changes are needed? Using important is typically last resort.
BTW. The problems/guidelines are describe here: mw:Recommendations_for_night_mode_compatibility_on_Wikimedia_wikis#Always_define_color_when_defining_background. You might want to look at: mw:Recommendations_for_night_mode_compatibility_on_Wikimedia_wikis#Avoid_using_background:_none_or_background:_transparent Nux (talk) 14:20, 28 February 2026 (UTC)Reply
@Newbzy let me know if the new sandbox works for you (e.g. on Template:Copied/testcases). If it does I can apply changes. Nux (talk) 14:37, 28 February 2026 (UTC)Reply
Apologies, I had to go to bed. Yep, on that testcases page, the sandbox version of the banner is displaying properly – but that's because it's set to use the sandbox module, which I edited to use the changes above. Would you like me to try and reduce/remove the use of important before we implement the changes, though? Newbzy (talk) 23:16, 28 February 2026 (UTC)Reply
No worries. I already reduced the changes, and now also applied them.  Done Nux (talk) 23:25, 28 February 2026 (UTC)Reply
Thanks very much! Newbzy (talk) 23:28, 28 February 2026 (UTC)Reply

And/or

[edit]

While the MOS doesn't apply to templates, the MOS:AND/OR guideline is widely accepted everywhere:

Avoid writing and/or unless other constructions would be lengthy or awkward. Instead of Most had trauma and/or smoke inhalation, write simply trauma or smoke inhalation (which would normally be interpreted as an inclusive or to imply or both)

Thus, the module should be modified like so:

Line 16: Line 16:
text = "The content of" text = "The content of"
else else
text = "Text and/or other creative content from" text = "Text or other creative content from"
end end
if not (from_oldid == "") then if not (from_oldid == "") then

FaviFake (talk) 09:03, 24 May 2026 (UTC)Reply

Turned into a TPER since there's no opposition. FaviFake (talk) 08:36, 8 June 2026 (UTC)Reply
 Completed. P.I. Ellsworth, ed.  welcome!  10:17, 8 June 2026 (UTC)Reply