Template talk:Spain metadata Wikidata
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]![]() | It is requested that an edit be made to the template-protected template at Template:Spain metadata Wikidata. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the template's sandbox before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
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)