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

Jump to content

Template talk:Marriage

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Marriage/doc)
Latest comment: 2 months ago by I dont like cricket I love it in topic Civil partnerships

Unexplained error template transclusion

[edit]

Why does THIS simple page version transclude {{error}} while the same page title without the diacritic does not? wbm1058 (talk) 15:07, 16 March 2025 (UTC)Reply

Here's my guess: there is code in the template that runs #iferror and then looks at the Wikidata item for property P570, "date of death". The page with the accent mark has a connected Wikidata item, and date of death is listed as "unknown value", which appears to be some sort of placeholder. I wouldn't be surprised if that iferror test generated an error. The page without an accent does not have a Wikidata page associated with it, so there is no error when the test is run. I could be wrong, though; that's as far as I got. – Jonesey95 (talk) 17:03, 17 March 2025 (UTC)Reply
The template documentation says "This template uses the Wikidata property "date of death" (P570) (see uses), where "see uses" does some sort of Wikidata data lookup. The documentation does not say how the date of death is used, nor does it say whose date of death is used (the article subject, or their spouse?), or why. I find this very annoying. – wbm1058 (talk) 22:27, 17 March 2025 (UTC)Reply
Marriage template errors provides several explanations that may be helpful. Neveselbert (talk · contribs · email) 21:16, 21 March 2025 (UTC)Reply
The Iníon Dubh biography is transcluding an error. Iníon Dubh is not reporting any errors on that page, so is not helpful here. – wbm1058 (talk) 10:09, 26 March 2025 (UTC)Reply
That appears to be because of Harv and Sfn no-target errors. Neveselbert (talk · contribs · email) 23:34, 27 March 2025 (UTC)Reply
There are over 3,500 articles in that category. That is a lower-priority error. If that were a top-priority error, we would see thousands of {{error}} transclusions. Currently there is only one {{error}}: Iníon Dubh. Normally, these generate big, bold, red messages but in this case that's not happening. As shown in my original post to this thread, I've isolated the problem to the page title. I'm considering moving the page to Inion Dubh, because apparently the diacritic is in error. – wbm1058 (talk) 11:28, 7 April 2025 (UTC)Reply
My hypothesis is that even if you move the page, once the Wikidata page is linked to the new title, the error transclusion will reappear. Supporting my hypothesis: if you remove Template:Marriage from that page and then preview it, there is no error transclusion. The page is not in Category:Harv and Sfn no-target errors, so I don't know why that category would be relevant here. – Jonesey95 (talk) 17:20, 9 April 2025 (UTC)Reply
I have edited the wikidata item to remove the error. The error is removed if you either remove the date of death parameter from wikidata or set it to no value. DrKay (talk) 17:47, 9 April 2025 (UTC)Reply
Thank you. I don't know whether you removed or nulled the date of death of Sir Hugh O'Donnell or the date of death of Iníon Dubh. But thanks for confirming that Wikidata was the culprit, and making the {{error}} go away. – wbm1058 (talk) 03:12, 13 April 2025 (UTC)Reply
I see, it was Iníon Dubh whose date of death was changed in Wikidata. – wbm1058 (talk) 15:05, 17 March 2026 (UTC)Reply

Bump. Iníon Dubh is still transcluding the error template. – wbm1058 (talk) 14:35, 17 March 2026 (UTC)Reply

Wikipedia says Iníon Dubh death_date = {{circa|1611}}. The imprecise date of her death should be irrelevant with regard to:
spouse = {{marriage|[[Sir Hugh O'Donnell|Sir Hugh McManus O'Donnell]]|1569|1600|end=d}}. Sir Hugh McManus O'Donnell died on 7 December 1600, so we do have a precise date for the end of her marriage, even though we lack a precise date for her death. – wbm1058 (talk) 15:13, 17 March 2026 (UTC)Reply
Removing the end of the marriage (parameters 3 and end) makes the {{error}} go away:
spouse = {{marriage|[[Sir Hugh O'Donnell|Sir Hugh McManus O'Donnell]]|1569}}
So, something is off in the way {{marriage}} looks at those two parameters. – wbm1058 (talk) 15:44, 17 March 2026 (UTC)Reply
Just removing parameter 3 only makes the error go away:
spouse = {{marriage|[[Sir Hugh O'Donnell|Sir Hugh McManus O'Donnell]]|1569||end=d}}
So, processing of {{{3}}} is the culprit. – wbm1058 (talk) 16:24, 17 March 2026 (UTC)Reply
What's the difference between "no value" and "unknown value"? "no value" works cleanly in this template, while "unknown value" transcludes {{error}}. I think I can check for "unknown value", and simply replace that with a null value.
Fixed (diff) – wbm1058 (talk) 22:42, 19 March 2026 (UTC)Reply

Template-protected edit request on 3 July 2025

[edit]

The Marriage template currently produces undesirable text alignment (namely on the mobile app and mobile site) due to a combination of the CSS style `white-space: nowrap` (in conjunction with the non-breaking spaces / nbsp's used). It only occurs with specific name-lengths, just the nature of style properties like white-space, display, word breaks, etc. (See Anya_Taylor-Joy for a current live example in main)

Updating the CSS class in the TempalateStyles styles.css to remove the `white-space: nowrap` property will alleviate much of this issue.

I've refreshed the /sandbox page from main and modified the sandbox styles.css to change the class name both to remove the "ws" (white-space) bit of the name, and updated the /sandbox template to reference that new class name in the one place it is used.

You can see the comparison on the Template:Marriage/testcases page under the Realistic Infobox_Person example section when viewing the page on mobile.

To implement, I'm requesting to change the following:

  1. Remove the white-space property line in styles.css in the `marriage-display-ws` class, and
  2. Update the one reference to the class name from `marriage-display-ws` to `marriage-display-inline` (in both the styles.css page and the template code itself of course)

Let me know if you have any questions on this — happy to chat more! Pedantical (talk) 18:20, 3 July 2025 (UTC)Reply

 Completed. P.I. Ellsworth, ed. put'er there 14:33, 4 July 2025 (UTC)Reply
Hi @Paine Ellsworth! Could you update the styles.css class that I mentioned? I could have phrased my request a little more concretely I think — sorry about that! :)
Could you change:
::.marriage-display-ws { :: display: inline; :: white-space: nowrap; ::} ::
to
::.marriage-display-inline { :: display: inline; ::} ::
This is the part about removing the unwanted property (display: inline) and renaming the class name to a more apt name (without this, references following the template may get bumped to a new line).
Thanks!
- Pedantical (talk) 18:37, 4 July 2025 (UTC)Reply
Oops, sorry, and  also completed. P.I. Ellsworth, ed. put'er there 20:32, 4 July 2025 (UTC)Reply

Posthumous marriage end error?

[edit]

I am confused what is breaking in order to cause an error on this article Ernst Friedrich von Liphart. The spouse died in 1931 and so end is specified as "died". The subject died in 1932. What's going wrong? Is there some imprecision in the math calculating age and death date?

And the template behavior seems to be to use the subject death date if marriage start is not given? Example: Michael Olutusen Onafowokan. Of course the marriage was before the subject died. I feel like this gives the impression that there's more knowledge about the marriage than there is and draws more attention to it. It seems like less of a hassle to just forgo using the template given how picky it is about dates.   Kilvin the Futz-y Enterovirus (talk) 05:01, 16 July 2025 (UTC)Reply

This appears to be an error, but I am unable to parse the complex logic of the #ifeq statements to figure out where the error is happening. If I copy and paste that template to the /testcases page, it does not produce any errors. I suspect, based on that brief test, that it might have something to do with the Wikidata for the article subject's date of death, which is a little screwy for that person. There are various calls to Wikidata in the template. For that article, the following tests that appear in the template yield the following output for Ernst Friedrich von Liphart:
{{#iferror:{{#time:Ymd|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} 19321130
{{#iferror:{{#time:Ymd|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}}} 19321130
{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} 1933-00-00
None of those dates are earlier than the 1931 death date given for the spouse, so there should not be an error. Strangely, none of those death dates match the death dates given in Wikidata; the only one with reliable sourcing, which is the one that WikidataIB should fetch, gives the death date in an unusual format: "1930s / earliest date March 1932 / latest date 1934". This one is a mystery to me. I suspect that if we had a reliable death date for the article subject, this problem would not manifest itself. It may be fixable in the template code, but since the returned dates seem to be later than the 1931 death date of the spouse, I am confused. It may be that the logic of the template is using a test that is different from the three above.
Note: After writing the above, I found this additional test:
{{#iferror:{{YEAR|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} }}|{{#time:Y}} }} 1930
And there we are. It may be that "1930s" is being turned into "1930" incorrectly. It appears that using {{YEAR}} in this logic is a problem; "1930s" should yield an error instead of "1930", and should then be ignored by the template; the "1931" value in the template should be accepted. – Jonesey95 (talk) 17:00, 18 July 2025 (UTC)Reply
Interesting. Thank you for your thorough investigation. I've never dealt with Wikidata, so I'm not familiar with that part of it. I do notice that Liphart's death in the infobox is April 14, 1932, so I am not sure what 1932-11-30 refers to. Here's something I noticed, there's a chance it's relevant to the inconsistent Wikidata – the ruWP version of the article hasn't been reviewed since 28 June 2024 so the stable version differs.  Kilvin👾 19:38, 18 July 2025 (UTC)Reply
Wait, hang on, has something magically changed? I see no change in the template history, and yet the pages in Category:Marriage template errors (sort key X) that would throw ugly errors are no longer doing so! The error associated with sort key X would produce
(m. 1900; her death is deprecated; use "died" instead. 1914) instead of (m. 1900; died 1914),  and to fix it, you would need to go in and change the last parameter from end=her death to end=died. But now, it seems (from a test edit on Archduke Franz Ferdinand) it is accepting end=her death in the template and just converting it to "died" on the page? I'm pleased, but still curious: where on earth did this change occur?  Kilvin👾 19:45, 18 July 2025 (UTC)Reply
I’m not in a great position this week to do a deep dive like I wish I could on this, but from my recollection on the template code, this may have something to do with the WikiData entry associated with the article subject. I vaguely recall there being some connection to the datapoints listed that help determine if an error is definitively worth showing or not.
But I may also just be making up a really epic backstory in my head about why this would happen.
Hope this helps! And if I stumble on this again eventually, I’ll absolutely dig more. Pedantical (talk) 16:24, 26 August 2025 (UTC)Reply

Two articles appear to have similar errors

[edit]
  • Richard of Shrewsbury, Duke of York – On 15 January 1478, 4-year-old Richard married the 6-year-old Anne, then Anne died 1481, then Richard disappeared in 1483 (presumed to have been murdered).
  • Iníon Dubh – married 1569; spouse died 1600, then Iníon died c.1611.

I came across these via my patrol of pages transcluding {{error}}s in mainspace. After failing to duplicate the {{error}} transclusions in my user sandbox, I also concluded that the template's handling of Wikidata data is the likely culprit. – wbm1058 (talk) 09:54, 25 October 2025 (UTC)Reply

The timelines for both articles look fine to me. If they are causing errors to be transcluded in the article, then that is probably similar to the description above. Thanks for the note; it may help someone to diagnose the problem. – Jonesey95 (talk) 19:22, 25 October 2025 (UTC)Reply
I should really just finish off my proposal for a replacement Module:Marriage to replace this logic ball of yarn... Pedantical (talk) 02:21, 26 October 2025 (UTC)Reply
Good luck. I first brought up the problem with Iníon Dubh in #Unexplained error template transclusion above. – wbm1058 (talk) 14:06, 13 November 2025 (UTC)Reply
The above two pages are still transcluding {{error}}s. Now, I see a third page doing the same:

Question on deprecation of his death/her death

[edit]

I was reading the documentation for this and it says that {tq|Use of his death or her death for this purpose has been deprecated}} and links to this discussion Template talk:Marriage/Archive 5#Use "(m. 1900)" and do not fill in an end date, but it doesn't seem like consensus was gained there. I don't really have a strong interest in whether or not it is deprecated, but I am wondering if I am misreading something or if a new discussion should be started to gain consensus Casablanca 🪨(T) 15:57, 26 August 2025 (UTC)Reply

BCE dates

[edit]

Does this template work (or can it be made to work) with BCE dates, or more complicated dates? I'm currently trying it for Antistia, who married Pompey the Great in 86 BCE and was divorced by him in 82/81 BCE.

The code I have thus far is {{marriage|[[Pompey the Great]]|86|82/81 BCE|end=div}}, which is analogous to how I'd lay it out in the similar {{circa}} template. This renders as

(m. 1986; div. invalid year)

)

(Line breaks and close parenth added by template). One secondary issue I note is that it reads "86" (or "086") as "1986", which means that it probably also doesn't work for any dates before 100 CE. UndercoverClassicist T·C UndercoverClassicist T·C 15:41, 9 February 2026 (UTC)Reply

This template is poorly documented, but a previous discussion in Archive 8 says "see Template:Marriage/testcases (search "Cossutia" for the particular testcase)" and appears to be recommending using the |reason= parameter as a workaround:
(86 – 82/81 BCE; divorced)
It works for now, until something better comes along. – Jonesey95 (talk) 06:45, 12 February 2026 (UTC)Reply
That'll do for now! Thank you. UndercoverClassicist T·C 07:50, 12 February 2026 (UTC)Reply
That might work but that is invalid data. The reason is not free text, it's meant for Reason for marriage's end per the /doc. If you aren't using the template correctly, then why use the template? just use non-template text. Gonnym (talk) 14:01, 12 February 2026 (UTC)Reply

Civil partnerships

[edit]

In the UK, there is a specific legal union in the UK which is called a Civil Partnership, which can be upgraded to a marriage, and has the same force and legal effect as a marriage. It was originally introduced only for same sex couples, but has now been extended to opposite sex couples. There is a need to include this here, as people like Rylan Clark, and Elton John, and Robert Rinder, all entered into a Civil Partnership, and simply listing “partner” ignores the fact that they were in a legal union which had to be dissolved by a court in the UK.

How can this template be improved to include this necessary addition. As in the UK marriage and Civil partnerships are both legal unions which can only be ended by a court. They are also both open to all couples regardless of sex. I dont like cricket I love it (talk) 13:34, 21 May 2026 (UTC)Reply

The label of "partner" is set by the infobox template and the parameter used to present this information within it, rather than by this template. Nikkimaria (talk) 04:38, 22 May 2026 (UTC)Reply
I’m asking for how to improve this template to include civil partnerships in this template. I dont like cricket I love it (talk) 11:17, 22 May 2026 (UTC)Reply
But the label you're referencing isn't produced by this template. So what specifically do you want to change here? Nikkimaria (talk) 00:13, 23 May 2026 (UTC)Reply
You are missing the point of things here marriage needs expanding to include civil partnerships I dont like cricket I love it (talk) 00:43, 23 May 2026 (UTC)Reply
I agree it would be useful to have a template like {{marriage}} handles the non-marriage situation, especially since {{Infobox person}} is so standardized for the former in its |spouse= field and so free-form and non-standardized for the latter in its |partner=. I see that {{partner}} even redirects to {{marriage}}, so it's a visible weakness that {{marriage}} only handles a single kind of partner. See Template talk:Infobox person#Ending-cause in partner= date-range for this in the context of today's mainpage FA.