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

Jump to content

Template talk:Spain metadata Wikidata

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

Errors

[edit]

@Underlying lk and Jonesey95: The template seems to be causing an error message Missing or empty |url= (help); |access-date= requires |url=, for example at Albelda de Iregua. Looking at Category:Pages using citations with accessdate and no URL, this seems to be a general problem with the template rather than on just a few isolated pages. Regards --John B123 (talk) 15:42, 12 April 2020 (UTC)Reply

Thanks for noticing this problem. Was it affecting all 7,000 articles that were using it? Yikes. I believe that I have fixed it; let me know if you see anything strange, especially with articles that use the |url= parameter (I didn't find any in a random sample of ten articles). – Jonesey95 (talk) 18:35, 12 April 2020 (UTC)Reply
It looks like if it was affecting all 7,000 articles. All seems ok now, I'll give you a shout if I come across anything odd. Thanks for sorting it out. Regards. --John B123 (talk) 18:56, 12 April 2020 (UTC)Reply

A different problem

[edit]

As you take {{..|population_total}} in both the infobox and in the main text (lede), you end up with two cites, rather the one. 95.144.182.129 (talk) 08:22, 23 April 2021 (UTC)Reply

Citation error message displayed for unrendered citation?

[edit]

Please see this discussion, which is beyond my current understanding but appears to involve this template. – Jonesey95 (talk) 16:06, 16 April 2022 (UTC)Reply

That discussion now at Help talk:Citation Style 1/Archive 83 § Script warning shown at top of preview, without error message or category.
Apparently this template is one of a series that uses the same sort of internal structure (testing {{wikidata|reference|raw|P1082...}}):
{{Austria metadata Wikidata}} – 2097
{{France metadata Wikidata}} – 35789
{{Germany metadata Wikidata}} – 0
{{Romania metadata Wikidata}} – 3067
{{Spain metadata Wikidata}} – 7408
{{Swiss metadata Wikidata}} – 0
I'm guessing that the {{cite q}} call gets its data from stated in (P248) in population (P1082) which (for Spain) leads to Municipal Register of Spain 2018 (Q60332597). The wikidata for the other templates in the series apparently don't have a stated in (P248) statement so they aren't broken (yet).
Editor Underlying lk: You wrote these templates; is it necessary to use a test that calls {{cite q}} but then discards the results of that call? If the purpose of the test is to ensure that data are available, shouldn't the template test for that data availability without making the call to {{cite q}}? In other words, is this:
{{#if:{{wikidata|property|raw|P1082|P585=2018-01-01}}|<true result>|<false result>}}
a better test than this:
{{#if:{{wikidata|reference|raw|P1082|P585=2018-01-01}}|<true result>|<false result>}}
—Trappist the monk (talk) 14:48, 7 August 2022 (UTC)Reply
Since Editor Underlying lk has declined to respond, I have taken a chance and changed:
{{wikidata|reference|raw|P1082|P585=2018-01-01}}
to this:
{{wikidata|property|raw|P1082|P585=2018-01-01}}
If this introduces new errors or breaks infoboxen where this template is used, revert me.
—Trappist the monk (talk) 14:11, 18 August 2022 (UTC)Reply

Retrieving data from 2018

[edit]

Hello, is there any reason for retrieving the population data from the year 2018? If the wikidata item has data for more recent years, why does not the template retrieve the most updated value? Aarón Mayo (talk) 20:45, 17 May 2025 (UTC)Reply

Template-protected edit request on 24 July 2025

[edit]

I would like to request an update of the template. The purpose is updating the demographics data that the template takes from wikidata (item Population (P1082)) and displays in the article. The edits needed for this are changing every instance of the year "2018" for "2024". Thank you, Aarón Mayo (talk) 09:18, 24 July 2025 (UTC)Reply

 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. What will the template do if 2024 data is not available? Is it possible to pull the latest available data and display the year? – Jonesey95 (talk) 13:49, 24 July 2025 (UTC)Reply
I made the changes in the template's samdbox. It works the same as before. In the population_total and population_as_of steps, if 2024 data is not available, the article will be added in a category for articles with missing data. Displaying the latest year's data, regardless of which year, would be the most optimal approach, because no manual updates would be needed in the future. Unfortunately, I have no idea how to do it, if it's possible. Aarón Mayo (talk) 16:02, 24 July 2025 (UTC)Reply
To editors Aarón Mayo and Jonesey95: I checked the sandbox edit (in preview) in two articles, and an error, {{citation}}: Cite has empty unknown parameter: |1= (help), is introduced by this edit. I put the Girona ibox on the [testcases] page to illustrate this. This should be fixed before going live. Also, the year (2018 or 2024) appears on the Girona page, as well as a municipal population figure, which increases from 2018 to 2024. These do not appear on the testcases page. P.I. Ellsworth , ed. – welcome! – 16:45, 12 August 2025 (UTC)Reply
 Redisabling request until this is ironed out. P.I. Ellsworth , ed. – welcome! – 03:34, 15 August 2025 (UTC)Reply
 Fixed and completed. P.I. Ellsworth , ed. – welcome! – 18:54, 30 August 2025 (UTC)Reply