Template talk:Spain metadata Wikidata
![]() | Template:Spain metadata Wikidata is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
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)
- 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)- 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)
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)
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)
- 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)
- 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)
- Since Editor Underlying lk has declined to respond, I have taken a chance and changed:
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)
Template-protected edit request on 24 July 2025
[edit]![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
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)
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)
- 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)
- 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)
Redisabling request until this is ironed out. P.I. Ellsworth , ed. – welcome! – 03:34, 15 August 2025 (UTC)
Fixed and completed. P.I. Ellsworth , ed. – welcome! – 18:54, 30 August 2025 (UTC)