Jump to content

Template talk:Infobox settlement/Archive 33

Page contents not supported in other languages.
Coordinates: 29°36′36″N 52°32′33″E / 29.61000°N 52.54250°E / 29.61000; 52.54250
From Wikipedia, the free encyclopedia
Archive 30Archive 31Archive 32Archive 33

Expression error

Waht causes the expression error in the example at the bottom in this version? Anrie (talk) 08:50, 30 November 2007 (UTC)

Sorry, I'd forgotten to udpate the example when the order of the parameters was changed. Think it's fixed now.--Kotniski (talk) 09:08, 30 November 2007 (UTC)
Thank you. Anrie (talk) 09:40, 30 November 2007 (UTC)

Interwiki : th

{{editprotected}}

Please add th:แม่แบบ:Lengthdisp to the template page. Thanks. --125.24.177.83 (talk) 03:22, 12 April 2008 (UTC)

checkY Done. I moved the documentation to a /doc subpage and added the interwiki link there. Further interwikis can be added to the non-protected /doc page. --David Göthberg (talk) 05:20, 12 April 2008 (UTC)

Automatic calc of population density

I don't really know whether to raise this here, or at one of the following: Template talk:Infobox settlement/permi2km2; Template talk:Infobox settlement; Template talk:Infobox French canton.

Basically, the problem is that when {{Infobox French canton}} is given (say) |pop=1000 but all of |km²=, |area= and |dens= are empty, error messages are shown in the infobox and the article ends up in Category:ParserFunction errors. To see some examples, visit that category and pick almost any of the "Canton of ..." articles, such as Canton of Albertville-Nord, and examine the "Population" section of the infobox. If you edit the page, and fill in a positive, non-zero value for |area=, the error message disappears. Unfortunately I do not have all the correct figures to fill in, so would prefer a template amendment.

Referring to the documentation of this template:

{{infobox settlement/densdisp|unit_pref|DENSsqmi|DENSkm2|POP|AREAsqmi|AREAkm2|subdivision_name}}

What I would like is that if either DENSsqmi or DENSkm2 has the value auto, and both AREAsqmi and AREAkm2 are blank, the density calculation should not be performed. --Redrose64 (talk) 15:40, 26 January 2010 (UTC)

I agree. I had been meaning to make the change for sometime. It's somewhat annoying to see an error there just because the area or pop is missing. Plastikspork ―Œ(talk) 16:17, 26 January 2010 (UTC)
I see that you have added {{Infobox settlement/checkauto}} as a pretest to one of the calls to {{Infobox settlement/densdisp}} - but there are four other calls within {{Infobox settlement}}, each of which could potentially exhibit similar problems. That said, the French canton articles are now dropping out of Category:ParserFunction errors (which is taking an absolute age to rebuild), so the problem that I described above is sorted. --Redrose64 (talk) 22:36, 3 February 2010 (UTC)
Great, I am glad to hear that I didn't break anything. I am proceeding slowly due to the complexity of these subtemplates. Basically, it appears I need to add a similar pretest to each call of densdisp? I also added some code to densdisp itself to remove the "auto" keyword in the case that the area and/or pop was missing. It appears to at least not introduce any new breakage. Plastikspork ―Œ(talk) 22:49, 3 February 2010 (UTC)

Removal of cases from switch

The 5 templates "mentioned" in the switch statement are actually being "used", I.E. transcluded in every article that has both kn and mi, up to 7 time for a maximum of 35 top level transclusions per page, but up to 3 or more times that as at least the following are called:

  1. Template:Country data USA (edit) (protected)
  2. Template:Country data United Kingdom (edit) (protected)
  3. Template:Country data United States (edit) (protected)
  4. Template:Country flag2 (edit) (protected)
  5. Template:Country flagicon2 (edit) (protected)
  6. Template:CountryAbbr (edit) (protected)
  7. Template:Flag (edit) (protected)
  8. Template:Flagicon (edit) (protected)
  9. Template:UK (edit) (protected)
  10. Template:USA (edit) (protected)

Given an occurrence of items that transclude this page is about 100,000 this is a high cost. The number of "badly formed" articles is about 3000, I porpose to add unit_pref = Imperial to these articles, where they don't already have it (which will be most cases), and remove the template matches. I could fix up the subdivison_name, but it would be swimming through treacle. Rich Farmbrough, 05:48, 1 May 2010 (UTC).

If you have the time and patience to do it, then go for it. By the way, there was some resistance to the use of the word "Imperial" for feet and square miles, since Imperial units is something else. I believe we have an alternative name? Plastikspork ―Œ(talk) 15:08, 1 May 2010 (UTC)


Values for unit pref (param 1 here)

  • 38216 Imperial
  • 16977 Imperial <!--Enter: Imperial, if Imperial (metric) is desired-->
  • 1569 Imperial<!--Enter: Imperial, if Imperial (metric) is desired-->
  • 788 Metric
  • 711 Metric<!-- or US or UK -->
  • 253 Metric <!--Enter: Imperial, if Imperial (metric) is desired-->
  • 166 US  Fixed
  • 96 metric  Fixed
  • 69 metric<!--Enter: Imperial, if Imperial (metric) is desired-->  Fixed
  • 68 Imperial<!--Enter: Imperial, to display imperial before metric-->
  • 50 metric <!-- enter: Imperial, to display imperial before metric -->  Fixed
  • 29 Imperial<!--Enter: Imperial, to display imperial before metric-->
  • 25 imperial  Fixed
  • 24 metric <!--Enter: Imperial, if Imperial (metric) is desired-->  Fixed
  • 22 Metric<!--Enter: Imperial, if Imperial (metric) is desired-->
  • 21 Imperial <!--Enter: Imperial, to display imperial before metric-->
  • 18 Imperial <!--Enter: Imperial, to display imperial before metric-->
  • 5 US<!-- or UK or Metric -->  Fixed
  • 4 Dunam |timezone=IST |utc_offset =+2 |timezone_DST=idt |utc_offset_dst=+3
  • 4 metric <!--Enter: Imperial, to display imperial before metric-->  Fixed
  • 2 standard  Fixed
  • 2 Metric<!--Enter: Imperial, to display imperial before metric-->
  • 2 imperial (metric  Fixed
  • 2 dunam
  • 2 Dunam
  • 1 Imperial <!-- Enter: Imperial, if Imperial (metric) is desired -->
  • 1 Dunam then can use total area in dunam will convert automatically-->
  • 1 Imperial <!--displays Imperial before metric-->
  • 1 Imperial set.</comment  Fixed
  • 1 American  Fixed
  • 1 US <!--Enter: Imperial, to display imperial before metric-->  Fixed
  • 1 Imperial<!-- Enter Imperial, if Imperial (metric) is desired -->
  • 1 Metric <!--Enter: Metric, if Metric (imperial) is desired-->
  • 1 Imperial<!-- enter: Imperial, to display imperial before metric -->
  • 1 Imperial <!-- Enter: Imperial, if Imperial (metric) is desired. -->
  • 1 US|area_land_sq_mi  Fixed
  • 1 Metric <!--Enter: Imperial, to display imperial before metric-->
  • 1 sq km <!--Enter: Imperial, if Imperial (metric) is desired-->  Fixed
  • 1 Imperial <!--Enter: Imperial, if Imperial (metric) is desired -->
  • 1 Imperial <!--Enter: Imperial, or leave blank for metric first-->
  • 1 IMetric<!--Enter: Imperial, if Imperial (metric) is desired-->  Fixed
  • 1 Metric (Celsius, centimetres, millimetres  Fixed

As of 2010-06-22.

Most of these will be fixed imminently, but it really looks is if we need only parse the value "Imperial". Rich Farmbrough, 14:44, 15 July 2010 (UTC).

Zero acres returned when ha is 1 or 10 or 100 (may be other instances)

Hard (impossible!) to know where it's going wrong. Could be in the precision.
As a matter of interest, why is #expr used rather than convert - that will do everything in one line - conversion from any to appropriate units, with display, and rounding? Johnmperry (talk) 01:01, 15 November 2012 (UTC)

the problem is with using template:precision, see Template talk:Precision#Bug?. I have asked for help from someone who knows that template. Frietjes (talk) 01:18, 15 November 2012 (UTC)
{{convert}} is both expensive and slow - it's easy to take the page beyond the template limits with just one apparently-simple calculation. I have seen the transclusion depth of a page change by about fifteen levels by the simple addition of one parameter to {{convert}}. Where the units to convert from and to are known in advance, and are unlikely to change, the parser function {{#expr:}} is far more efficient. --Redrose64 (talk) 09:57, 15 November 2012 (UTC)
I don't understand why on line 46 the precision of the input is reduced on output. Why wouldn't we want both the same? (particularly since acres are smaller than hectares). I don't know how to test this (nor want to know). Other cases also invoke Order of magnitude, but that seems to be inferring that an input which is an exact multiple of 10 (100, 1000 ...) has already been rounded by inputter. Kind of second-guessing.
And from an efficiency point of view, isn't division much slower (hungrier) than multiplication? So why is the input divided by a constant rather than multiplied by one? Johnmperry (talk) 00:37, 16 November 2012 (UTC)
The difference between relative speeds of mathematical operators is negligible compared to the time spent expanding templates and parsing parameters. I'm going to drop a note on Jimp (talk · contribs) who wrote most of this. --Redrose64 (talk) 09:55, 16 November 2012 (UTC)
yes, the issue is definitely with parsing/expanding the expressions. the cost of a flop is going to be nothing compared the the cost of the text processing. and, we aren't really concerned about "cost" as we are with the limits imposed by MediaWiki on expression depth. we should see how expensive this template is compared to convert though to assess if switching to convert is feasible. Frietjes (talk) 21:16, 16 November 2012 (UTC)
It was over-rounding the conversion. It's fixed. JIMp talk·cont 02:36, 17 November 2012 (UTC)

Edit request: Add documentation sub-page

Please add the newly created documentation sub-page Template:Infobox settlement/pref/doc, which can be done by replacing everything between <noinclude> and </noinclude> with {{documentation}}. -- Zyxw (talk) 03:39, 31 January 2013 (UTC)

Done --Redrose64 (talk) 12:59, 31 January 2013 (UTC)

Edit request: Add documentation sub-page

Please add the newly created documentation sub-page Template:Infobox settlement/impus/doc, which can be done by replacing everything between <noinclude> and </noinclude> with {{documentation}}. -- Zyxw (talk) 09:15, 4 February 2013 (UTC)

Done --Redrose64 (talk) 17:43, 4 February 2013 (UTC)

Edit request: Fix over-rounding in conversion of square miles to km2

Infobox settlement
Area
 • City
10,000 sq mi (30,000 km2)
 • Land1,000 sq mi (3,000 km2)
 • Water100 sq mi (300 km2)
 • Urban
10 sq mi (30 km2)
 • Rural
1 sq mi (3 km2)
 • Metro
0.1 sq mi (0.3 km2)
 • blank10.01 sq mi (0.03 km2)
 • blank20.001 sq mi (0.003 km2)

While updating the documentation for this template, I noticed it is over-rounding the conversion of square miles to square kilometres, such that an area of 10,000 sq mi displays 0 km2 as the conversion (see examples to the right). This is similar to the recently fixed problem with conversion of hectares to acres and can be fixed the same way, by removing "-1" in the following portion of Template:Infobox settlement/areadisp:

|{{rnd<!-- convert square miles to square kilometres -->
   |{{#expr:{{formatnum:{{{sqmi}}}|R}}*2.589988110336}}
   |({{precision|{{formatnum:{{{sqmi}}}|R}}}}-1)
 }}<!-- end rnd -->

I have implemented the suggested correction at Template:Infobox settlement/areadisp/sandbox (diff) and provided multiple test cases at Template:Infobox settlement/areadisp/testcases. -- Zyxw (talk) 00:19, 5 February 2013 (UTC)

Done! Plastikspork ―Œ(talk) 00:04, 17 February 2013 (UTC)
Thanks! -- Zyxw (talk) 10:25, 17 February 2013 (UTC)

Edit request on 19 July 2013

Please update to use this version of the sandbox. this will fix a long-standing bug described in this thread. if you check the code for {{rnd}}, it looks for bad values for the precision, then sends them to Category:Pages with bad rounding precision. it then ignores the value specified here, and uses (1 - order of magnitude) instead. this patch corrects the bug by simply sending the value of (1 - order of magnitude) to the {{rnd}} template. hence, the ultimate output will be unchanged, but it will remove the tens of thousands of articles appearing in Category:Pages with bad rounding precision. Frietjes (talk) 21:09, 19 July 2013 (UTC)

Done! Thanks for fixing the bug! Plastikspork ―Œ(talk) 00:11, 20 July 2013 (UTC)
another small tweak, it appears as though this still adds articles to Category:Pages with bad rounding precision if the population is zero. it looks like this due to whitespace sensitivity of {{order of magnitude}} when checking if the input is zero. In the sandbox version, I removed some space and it fixes the problem. Frietjes (talk) 15:55, 27 July 2013 (UTC)
Done! Plastikspork ―Œ(talk) 23:50, 27 July 2013 (UTC)
thank you, the category has dropped from over 50,000 pages to under 200 pages, so it appears this has worked! Frietjes (talk) 16:08, 28 July 2013 (UTC)

Bug with explicitly specifying metric

Currently, the template defaults to metric as a last resort. If the first parameter is specified as metric and the second one as United Kingdom, for example, it still picks the impus option instead of metric:

Code: {{infobox settlement/pref|metric|United Kingdom}}

Result: impus

This seems like a bug. Getsnoopy (talk) 03:17, 29 December 2020 (UTC)

Auto

Did "auto" for the settlement infobox at Urban agglomeration of Montreal, and it doesn't work. I've noticed this with other pages, too. What could be causing it not to work? Criticalthinker (talk) 10:03, 27 February 2023 (UTC)

Short description templates

Hello! I'm an admin from SqWiki and we have imported the same modules and templates that EnWiki has in regard to the settlement infobox. Can someone explain to me why are we getting so many auto-generated templates (link) from this template? I understand the general outline of the mechanism at work with the short description and Wikidata. I don't understand why are we getting templates and what should be the content of those templates generally speaking. - Klein Muçi (talk) 15:15, 28 September 2023 (UTC)

See WP:VAR. The magic word SHORTDESC does not exist on your wiki. There are probably a few ways to work around this difference. One probably stupid idea is to change Stampa:Short description so that it is blank on sq.wiki. – Jonesey95 (talk) 16:20, 28 September 2023 (UTC)
Jonesey95, oh... Any idea how the other wiki projects have handled this? I mean, we can ask for SHORTDESC to be activated as a magic word at us as well but... Are there any reasons why only EnWiki has that? Is it just that other wikis haven't yet asked for it? Or are there other reasons at play? — Klein Muçi (talk) 16:27, 28 September 2023 (UTC)
Other wikiprojects use the short descriptions that are provided by Wikidata. We at en.WP decided we didn't like that method. – Jonesey95 (talk) 16:30, 28 September 2023 (UTC)
Jonesey95, ah... What change do we do so that we go the Wikidata way? — Klein Muçi (talk) 17:19, 28 September 2023 (UTC)
No changes. If you go to the search box on sq.WP and type "Ernest Koliqi" (do not press Enter), you will see suggested results. Below the article title for first result, you will see "shkrimtar shqiptar". That short description is automatically pulled from Wikidata (click "All entered languages" near the top of the page to see the descriptions in many languages). – Jonesey95 (talk) 18:40, 28 September 2023 (UTC)
Jonesey95, I see. What about depopulating the wanted templates list? Is there any change you can suggest that gives a good solution to that? Apart from blanking that template (which looks like a crude hack - maybe it's not?) — Klein Muçi (talk) 19:41, 28 September 2023 (UTC)
If you wanted to customize your imported templates to remove calls to Stampa:Short description, I suppose you could replace the contents of Stampa:Short description with a tracking category that would tell you which pages are trying to create short descriptions. If you modify those templates, they would stop trying to use the template. The problem will happen again when you import new versions of the templates, of course. I have tried to think of a negative result from blanking the template, and I haven't thought of anything. It is probably the best option. I would leave some documentation in place; feel free to copy some version of this conversation over to the documentation page. – Jonesey95 (talk) 19:55, 28 September 2023 (UTC)
Jonesey95, soo, like this? Just double-checking I've understood you correctly. (Assuming just deleting the template wouldn't work, no?) — Klein Muçi (talk) 20:14, 28 September 2023 (UTC)
Yes. Now if you edit sq:James Blunt and open "Stampa të përdorura në këtë faqe:", you will see that it is not trying to find "Stampa:SHORTDESC:Musical artist‏‎" anymore. – Jonesey95 (talk) 20:21, 28 September 2023 (UTC)
Jonesey95, thank you very much for the detailed help! Hopefully the wanted templates list will soon be depopulated now. — Klein Muçi (talk) 20:35, 28 September 2023 (UTC)

Edit request 28 September 2023

Reposting this as I realized that I hadn't posted it as an edit request. I've noticed that several short descriptions for Brazilian municipalities use the following format "Municipality in REGION, Brazil". This can be seen in the following articles: São Gabriel da Cachoeira, Tabatinga, Petropolis, etc... While not incorrect, this would be like the Chicago article being "City in Midwest, United States" or the San Francisco article being "City in West Coast, United States". I think these short descriptions are autogenerated from pulling the subdivision_type1 field from the settlement infobox template. I propose instead that it should use the subdivision_type2 field, so that it uses the Brazilian state that the municipality is located in. BaduFerreira (talk) 15:26, 28 September 2023 (UTC)

@BaduFerreira: the issue is that the use of these fields is not the same country-to-country. For example in the United States, type1 is for state and type2 is for county. Not sure what the best fix here would be. Elli (talk | contribs) 20:12, 28 September 2023 (UTC)
I'm very new to Lua and can't figure out how to make local changes and test them in a non-disruptive way, but wouldn't picking subdivision_name #3 instead of subdivision_name #2 if subdivision_name #1 is Brazil work? Would that be too computationally strenuous for every instance of Module:Settlement short description to check if the country is Brazil and, if so, do different behavior? BaduFerreira (talk) 22:02, 28 September 2023 (UTC)
You use the sandbox copies of both Template:Infobox settlement/sandbox and Module:Settlement short description/sandbox to experiment. No it would not be too computationally strenuous to do that check, and it may be that other countries will benefit from your work too. I can envisage some kind of configuration table which tells the module how to format the short descriptions for various different countries. I've disabled this request because it is obviously a long way from fruition. — Martin (MSGJ · talk) 10:42, 29 September 2023 (UTC)

Mapframe?

Sorry for silly question; is it possible to get mapframes in the Infobox? I see in the archives that it was discussed in 2020, but a "mapframe" arg doesn't seem to work for me. toobigtokale (talk) 15:09, 30 September 2023 (UTC)

Template-protected edit request on 28 October 2023

Under "Parameter names and descriptions", the description for 'population_note' should not refer to Windsor, Ontario as an example, as that article infobox no longer (evidently) contains any entry for 'population_note'. A different example should be found for reference. Veggies (talk) 08:43, 28 October 2023 (UTC)

 Not done: {{edit template-protected}} is usually not required for edits to the documentation or categories of templates using a documentation subpage. Use the 'edit' link at the top of the green "Template documentation" box to edit the documentation subpage. Let me know if you cannot edit the /doc page for some reason. P.I. Ellsworth , ed. put'er there 15:12, 28 October 2023 (UTC)

Old name as "other name"

From what I observed for the actual usage of the field, other name is meant for commonly used and presently used name for a city. Saint Petersburg doesn't have "Leningrad/Petrograd", Nakhon Ratchasima has "Korat".

Can we add an old/former/historical names field for this purpose? Like Parañaque is barely known as Old Palanyag these days but the archaic name was added in at some point.Hariboneagle927 (talk) 07:40, 1 November 2023 (UTC)

That depends on how common the old name is still being used. But in general, former and archaic names should not be used as "other name" (I have been removing those too when I see them). Regards, -- P 1 9 9   13:24, 1 November 2023 (UTC)
I realized I have editing perms for the documentation. I tweaked the usage guide for other_name as per this discussion. Is my version better and more clear? (from "For places with a former or more common name like Bombay or Saigon" to "For places with other commonly used names like Bombay or Saigon") Hariboneagle927 (talk) 10:52, 4 November 2023 (UTC)
I think it would be clearer, if the intention is not to use this for old names, to find examples that are not also old names. Nikkimaria (talk) 03:13, 5 November 2023 (UTC)

Is there a way to change what order the information displays?

I Would like to have the factual information display above the images/maps, & have the nickname(s) be directly bellow the actual name. 😎😎PaulGamerBoy360😎😎 (talk) 02:32, 2 November 2023 (UTC)

No, there is no way to change the order. Nor should there be! Just imagine all the edit wars if every user changes the order to what they like, not to speak of the lack of uniformity... -- P 1 9 9   13:52, 14 November 2023 (UTC)
  • The problem is look at the way the infobox looks on this page: Middleton, Utah
  • Is there any custom infoboxes I could use?
😎😎PaulGamerBoy360😎😎 (talk) 14:52, 14 November 2023 (UTC)
Template:Infobox settlement is the infobox that communities in USA use, please don't change to some other random infobox. • SbmeirowTalk16:30, 14 November 2023 (UTC)
I wasn't going to use a random one, the problemis the fact that you have to scroll to the bottom of the infobox to see the usefull facts. 😎😎PaulGamerBoy360😎😎 (talk) 16:33, 14 November 2023 (UTC)
The infobox in that article isn't that bad compared to the length in some other articles, such as Dallas. My point is meant that you really don't have a choice, because all community articles use the same template. Anyway, I moved the photo in that article, so now your problem is solved. • SbmeirowTalk20:44, 14 November 2023 (UTC)
thanks 😎😎PaulGamerBoy360😎😎 (talk) 20:48, 14 November 2023 (UTC)

Edit request 14 November 2023

Description of suggested change: Please remove {{{Short description}}} from the list in Check for unknown parameters (Short description was removed in 2019-08) — GhostInTheMachine talk to me 10:41, 14 November 2023 (UTC)

 Done — Martin (MSGJ · talk) 12:24, 14 November 2023 (UTC)
Thanks. Added about 6k articles to the error tracking category — GhostInTheMachine talk to me 21:49, 14 November 2023 (UTC)

Vote for consensus on "Order of maps"

Hi, the order of maps should be first pushpin_map and then image_map, because we should start from general to more specific. This rule is not applied for example in the article Bushehr. I.e. it currently shows first image_map and then shows pushpin maps. Please do something to reverse it. Thanks, Hooman Mallahzadeh (talk) 16:54, 4 December 2023 (UTC)

 Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. Primefac (talk) 20:53, 4 December 2023 (UTC)
Please discuss to reach consensus about changing order. We should first show more general map and then show more specific one. I.e., pushpin should be on top of mapframe image. Pushpin shows more general aspect, i.e. map in a country or continent, and then we show inside content in mapframe image. So the order should be reversed. Hooman Mallahzadeh (talk) 08:15, 5 December 2023 (UTC)
@Primefac Is my method of reaching consensus, ok? If it is, please vote for it yourself. Thanks, Hooman Mallahzadeh (talk) 08:17, 5 December 2023 (UTC)
@Primefac Making consensus on this change seems a very time-consuming process. But I really think that this change is reasonable, the order should be from more general to more specific. This order is obvious and is applied in many other phenomenons in science and in English language. So, I think that it is obvious, and no consensus is needed, because it is very time-consuming. Thanks, Hooman Mallahzadeh (talk) 17:04, 5 December 2023 (UTC)
See below. Primefac (talk) 19:17, 7 December 2023 (UTC)

I disagree with this change. Such order is purely based on subjective preference. Who says that we "should" have the general map first? There is no benefit to changing this. We're not changing layouts every time someone doesn't like it... -- P 1 9 9   20:50, 5 December 2023 (UTC)

Motto parameter

Regarding the 'motto' parameter: if the character-string of a motto contains commas, it appears to be parsed as containing more than one motto, and the display of the motto in the Infobox reads Motto(s):

Is there a workaround? and/or could the spec for 'motto' be tweaked?

Protalina (talk) 15:34, 10 December 2023 (UTC)

It looks like a comma is currently set so that {{Pluralize from text}} views it as "likely", hence the (s) as it's not definite. I don't really know if we can make a hard delineation between mottos with a comma and multiple mottoes in one parameter. Primefac (talk) 21:11, 10 December 2023 (UTC)
The documentation for that template says to insert {{force singular}} into the parameter value in the affected article. It works.Jonesey95 (talk) 15:11, 12 December 2023 (UTC)
Huh, missed that. Good catch. Primefac (talk) 15:23, 12 December 2023 (UTC)

Template-protected edit request on 20 December 2023

On Navajo Nation, the flag currently bears the alt/title text "Flag of {{{official_name}}}" because the flag alt/title does not use the page name by default. It seems this also happens with the seal, coat of arms, etc.

Please replace all instances (7 of them) of

{{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}

to match the syntax used for this infobox's |above=:

{{if empty|{{{name|}}}|{{{official_name|}}}|{{PAGENAMEBASE}}}}

I've tested this change at Template:Infobox settlement/sandbox. There's no applicable test case for this since all of the ones in /testcases all have set |name= or |official_name= parameters (to avoid "Template:Infobox settlement/testcases" from being used). But you could go to Navajo Nation, edit the article, replace the use of "Infobox settlement" with the sandbox, and it should work properly in the preview. Chlod (say hi!) 03:50, 20 December 2023 (UTC)

 Done hi chlod SWinxy (talk) 01:38, 21 December 2023 (UTC)
thanks, @SWinxy! :D Chlod (say hi!) 01:49, 21 December 2023 (UTC)

Why is Hellersdorf in the "bad settlement type" category?

Can anyone explain why Hellersdorf in Category:Pages using infobox settlement with bad settlement type? – Jonesey95 (talk) 02:51, 14 January 2024 (UTC)

Looks like this gets rid of that error and creates another one? Nikkimaria (talk) 03:00, 14 January 2024 (UTC)
Confusingly, |City= is a valid parameter in {{Infobox German place}}, which is a wrapper for this template, which calls Module:Settlement short description, which generates the error category. I haven't been able to figure out why the module thinks that the value it is fed is a bad settlement type, though. – Jonesey95 (talk) 03:06, 14 January 2024 (UTC)

"Show both" instead of "Show all"

When there's two maps that can be flipped between, instead of an option that says "Show all" it should say "Show both". Akeosnhaoe (talk) 10:02, 12 January 2024 (UTC)

Some articles contain more than two pushpin maps in the infobox (though I don't think I've seen more than three). Deor (talk) 12:03, 12 January 2024 (UTC)
I understand, and for those cases (3 or more) it should be "Show all". Akeosnhaoe (talk) 03:14, 20 January 2024 (UTC)
It's irrelevant - this is not the place to discuss the matter, as this infobox has no control over {{Location map}}. If you want the map to change as proposed, it should be discussed at Module talk:Location map. Primefac (talk) 13:53, 20 January 2024 (UTC)

When I set the value of child parameter of the sub-template to Yes, why doesn't it appear as intended, especially within Infobox settlement? The border still exists. Natsuikomin (talk) 11:42, 23 January 2024 (UTC)

Can you give an example? E.g. at Marrakesh this seems to work as intended. Fram (talk) 12:09, 23 January 2024 (UTC)
In George Town, Penang infobox. Can you believe what I've been going thru?
The order of paramater matters. The sub-infobox should be right below the website parameter (so the website would be the last parameter in the infobox if the sub-parameter were removed). And the infobox I edited has its website parameter in the middle of the other parameters. Moreover, the value of child parameter inside the sub-infobox should be 'yes' (not capitalised) instead of 'Yes' (capitalised).

This is the first I met a case like this. I used to think that Wikipedia server machine will not take the order into account and just rearranges the parameters order for us when we want to render the page on our browser. Hereby, I have found the solution after it took me about 1 hour. Thanks. Natsuikomin (talk) 12:54, 23 January 2024 (UTC)
Okay, I lately noticed a new thing about the order. The order is the case if I don't use the module parameter. I originally just put the Infobox UNESCO World Heritage Site at the bottom of the parent infobox because I took the infobox on Hebron as an example. Hmm.. Natsuikomin (talk) 13:26, 23 January 2024 (UTC)
The documentation for this template explains: "module: To embed infoboxes at the bottom of the infobox". You figured it out on your own. The order of parameters does not matter if they are used correctly. I have fixed Hebron. – Jonesey95 (talk) 16:51, 23 January 2024 (UTC)
I know. At first I used the module parameter, but the sub-infobox had a border around and the width didn't occupy 100% as it looks now on George Town, Penang and Hebron. It likely happened because I set the value of child parameter of the sub-infobox to 'Yes' (capitalised) instead of 'yes' (not capitalised). That's why I use Hebron infobox as an example and, as you can see from my previous comments, the second problem came. Natsuikomin (talk) 22:41, 23 January 2024 (UTC)

Move some items from left side to right side

I think some items, like elevation_max_point and elevation_min_point, should be moved from the left to the right side. When there is too much text on any row on the left side (like these two parameters), the left column automatically becomes wider and the right column becomes narrower, which isn't great, because the right column generally has more text overall.

An example is Montgomery (village), New York, where you can see the wider left column and narrower right column. I prefer names, areas, and population density on a single line when possible.

I will also note that the "desktop" and mobile views look different. There is much more whitespace on the "desktop" version, and on the page I mentioned, the ratio between left and right column widths is better on the mobile version. Kk.urban (talk) 20:28, 11 March 2024 (UTC)

That page looks normal to me in both the desktop and mobile versions. I use the default Vector 2022 skin for desktop. That said, I also think those two parameters should be moved to the right side; they are values, not labels. I have modified the sandbox, and you can see a test case in my sandbox. – Jonesey95 (talk) 21:32, 11 March 2024 (UTC)
@Jonesey95 It looks different from "normal" because on most settlement articles, the right column is wider than the left. Your sandbox looks good. Kk.urban (talk) 22:20, 11 March 2024 (UTC)

Default image alt text duplicates caption

This code for this infobox when embedding an image contains |title={{if empty|{{{image_caption|}}}|{{{caption|}}}|{{{image_alt|}}}|{{{alt|}}}}}}}. When the alt= parameter is empty or missing, this results in the image's ALT text getting set to the text of the caption. (example) This is an improper ALT text: The alt text is intended to be read out by screen readers just before the caption, so avoid having the same details in both. (MOS:ALT) This behavior is also unhelpful for sighted readers in that it repeats the caption right below the image. Opencooper (talk) 16:19, 4 March 2024 (UTC)

When I expand the infobox at Algiers using Special:ExpandTemplates, I do not see any |alt= attributes in the code for any of the images, but there is a lot of code. Can you please create a minimal example showing the problem? – Jonesey95 (talk) 18:42, 4 March 2024 (UTC)
Sorry, I should have been more clear. The alt attribute I am referring to is in the final generated HTML on the article's page. If you right click the image and use your browser's inspect element feature, you'll see <img […] alt="Clockwise, top left[…]. Opencooper (talk) 00:00, 5 March 2024 (UTC)
What would be your proposed resolution? Nikkimaria (talk) 04:07, 5 March 2024 (UTC)
Many other Infobox templates set the image title to the alt text, if there is any. So one solution would be to stop using the caption: |title={{if empty|{{{image_alt|}}}|{{{alt|}}}}}}}. Opencooper (talk) 05:34, 5 March 2024 (UTC)
Feel free to make that change in the sandbox to see if it makes a difference. When I expand the infobox at Algiers, the File call in wikitext looks like [[File:Algiers Montage.png|275px|'''Clockwise, top left''': Coast of Algiers, [[Maqam Echahid|Maqam Echahid (Martyrs' Memorial)]], [[Notre-Dame d'Afrique|Basilique Notre Dame d'Afrique]], [[Ketchaoua Mosque]], [[Kasbah of Algiers]], [[Grande Poste d'Alger|Algiers Central Post Office]], [[Ministry of Finance (Algeria)|Ministry of Finance building]]]]. I don't see an alt tag in there, which makes me think that changing this infobox will not change the rendered HTML. Something in the MediaWiki code may be generating the alt text in the rendered HTML. – Jonesey95 (talk) 19:30, 5 March 2024 (UTC)
I was operating under the assumption that these templates did not use the image linking syntax, but this proves otherwise. Therefore, your comment over at Infobox writer seems to apply: when thumb […] is not specified [and] no alt text is specifically requested, use the requested caption as alt text. So technically this is expected behavior of the image linking syntax. (though confusingly, is not seen on all Infobox templates) But this behavior is against the MoS and results in unhelpful duplication. However, I'm not sure where to get this changed and would probably need an RfC. Opencooper (talk) 16:49, 15 March 2024 (UTC)

Two maps conveying the same information in infobox

Resolved

Is there a way to remove the pushpin map in Milwaukee while keeping the switchable map above it? Because that's switchable, it shows the same information to readers and greatly extends the infobox. Ed [talk] [OMT] 21:23, 20 May 2024 (UTC)

Well, if you really want to do that, you can simply remove the |pushpin_map= parameter (and the two following parameters) in the infobox. You could get some pushback from other editors, though. Deor (talk) 21:33, 20 May 2024 (UTC)
@Deor: The problem is that leads to the first map showing all its parameters, instead of remaining switchable. :-) Ed [talk] [OMT] 00:18, 21 May 2024 (UTC)
I see two switchable maps at that link. What exactly do you want to see? – Jonesey95 (talk) 00:44, 21 May 2024 (UTC)
@Jonesey95: Apologies, I meant to link to a diff.
I think I've figured out the issue–it may be something to do with article caches. When I removed pushpin second map again, I once again saw the first map go from switchable to showing four separate maps. But after purging the cache, the article appeared normal again. I tested and had the same thing happen at Detroit, including the cache purge fix. Funky. Apologies for taking up y'all's time! Ed [talk] [OMT] 03:04, 21 May 2024 (UTC)

Edit request 1 June 2024

Description of suggested change:

Would it be possible to add 'police' and 'fire' fields after the government section please? I'm sure this is a pretty universal field for most settlements and tagging it on the bottom in the blank fields with GDP etc. looks a little odd.

Dgp4004 (talk) 23:17, 1 June 2024 (UTC)

That stuff belongs in the "Government" section of the article. There is already too much infobox bloat. • SbmeirowTalk03:26, 2 June 2024 (UTC)
Please suggest the change and get consensus for it before activating an edit request. Johnuniq (talk) 03:36, 2 June 2024 (UTC)

Oversized maps

User:RAGentry has been adding oversized maps to hundreds of US city articles. My concern is that this makes the infobox unnecessarily wide (the default size is 250 px). At Berryville, Texas, for example, there are no photos in the infobox, so no need for an oversized map. The input of others would be appreciated. Magnolia677 (talk) 15:52, 2 June 2024 (UTC)

In my defense, 250 is only a default and not prescribed, and there are plenty of articles which use 280 as the size of their infobox. 280 makes the maps easier to see and understand and ensures that the entire shape fits into the map. The idea of "oversized" is subjective, considering it is only a 30 pixel difference. Is it really that big of an issue? RAGentry (talk) (contributions) 16:03, 2 June 2024 (UTC)

Also, I note that on the main page of this template, Template:Infobox settlement, one of the example infoboxes is 275px wide, while the other is 290px wide. These are both wider than the default of 250px. That both examples are wider than 250px seems to me to suggest that expanding beyond the default of 250px is definitely acceptable, especially if the circumstances support it (such as increased readability of interactive map thumbnails), and especially if they are not being increased beyond 290px wide, which is the width of one of the example infoboxes in the documentation of this template. I would suggest that the examples of an infobox in its documentation provide more weight to the acceptable widths of a template than the default width in the template parameters. RAGentry (talk) (contributions) 16:14, 2 June 2024 (UTC)
In general, the size fields shouldn't exist at all to all wikimedia to auto size the images according to user preference settings or default settings, except to shrink photos in infoboxes. Large fixed sizes are a problem on small devices such as smartphones, especially in infoboxes. Almost always, I delete those fields from the infobox, and I recommend you to do the same. • SbmeirowTalk21:35, 2 June 2024 (UTC)
That's a good point; I see how having no fixed size could be beneficial. The problem with this is that in the case of interactive maps, the infobox is ultimately going to be widened by the frame width set in the Maplink template. Removing these creates a rectangular map (300px wide by 200px high) rather than a square map, which is the norm for interactive maps on city articles. It also makes the infobox 300px wide, which might be offensive to some people. What do you think might be a good workaround for this? Also, where in preferences can the images be auto-sized? — RAGentry (talk) (contributions) 22:13, 2 June 2024 (UTC)
Where does it say square maps "is the norm for interactive maps on city articles"? At Template:Maplink, the infobox example is rectangular, and the template specifically states "additional parameters are available to customise the displayed map", such as width and height. Magnolia677 (talk) 22:43, 2 June 2024 (UTC)
Norms just refer to something that is standard, not necessarily something that is written in as policy. I mentioned it to explain why I chose to use square maps, referring to the trend seen in articles such as Erie, Pennsylvania, Harrisburg, Pennsylvania, San Francisco, and others. Of course, it is possible and likely that there are others that do not match this trend, but I was using square maps because it is what I saw in other interactive maps on city articles. The example in a template documentation is not a requirement, and that there are additional parameters available to customise the displayed map seems to suggest that it is not a requirement for it to be rectangular. — RAGentry (talk) (contributions) 23:45, 2 June 2024 (UTC)
My slight mistake, preferences has a setting for thumbnail photos in the article, it appears to not affect the infobox. In general, many infoboxes are already too dang big in community articles, and increasing the size of photos or maps makes the problem much much worse. Remember that a user can click on a photo or map to see a full size version of it, thus solving the size problem. Please do not increase the size of maps or images in infoboxes. • SbmeirowTalk22:40, 2 June 2024 (UTC)
Ok, I will not increase the size of maps or images in infoboxes. — RAGentry (talk) (contributions) 23:45, 2 June 2024 (UTC)

Conversion error

I've noticed that when area_total_km2 and area_land_km2 is automatically converted to square miles, something odd is happening. In KM2, area total can be larger than area land. But once converted into sq mi, area land becomes larger than area total.

You can see this in action at Borough of Halton.

I can only think it must be something hard coded in the conversion, perhaps a rounding error. Perhaps someone more knowledgeable than me will know what might be behind it please? Dgp4004 (talk) 23:34, 9 June 2024 (UTC)

A small bug/edit request

Greetings and felicitations. In the La Habra, California infobox there is a carriage return between the estimate and the estimated population note. This is consistent between (Mac) Firefox and Safari in desktop mode, though it does not appear in iOS Safari. I'm hoping that someone can find and fix the problem, please. —DocWatson42 (talk) 05:36, 13 June 2024 (UTC)

I don't think this is a bug on the template side, the code is
| label88 = &nbsp;•&nbsp;Estimate&nbsp;<div class="ib-settlement-fn">({{{pop_est_as_of}}}){{{pop_est_footnotes|}}}</div>
Which puts the "as of" directly before the footnotes with no extra space, so it's likely a wrapping thing. Primefac (talk) 22:20, 13 June 2024 (UTC)
Okay—thank you. ^_^ DocWatson42 (talk) 01:51, 14 June 2024 (UTC)

Edit request 17 June 2024

Description of suggested change:

Please replace the manual conversion formulas in this template with Template:Convert as unfortunately the existing set up is producing errors (please see Template talk:Infobox settlement#Conversion error above). Probably not a quick edit I'm afraid, sorry to make big work.

Dgp4004 (talk) 17:19, 17 June 2024 (UTC)

I think the area formulas are actually held in this sub-template: Template:Infobox settlement/areadisp. Would this request be better submitted there or is this sufficient please?
Dgp4004 (talk) 17:25, 17 June 2024 (UTC)
 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. – Jonesey95 (talk) 23:16, 17 June 2024 (UTC)
I would if I understood it. But it's fiendishly complex sadly. Dgp4004 (talk) 23:20, 17 June 2024 (UTC)

Conversion error

I've encountered a strange error in the area fields and I can't think what's causing it.

In KM2, area total can be larger than area land. But once converted into sq mi, area land becomes larger than area total. You can see this in action at Borough of Halton.

I can only think it must be something hard coded in the conversion, perhaps a rounding error? It doesn't occur when using Template:Convert. Perhaps someone more knowledgeable than me will know what might be behind it please. Dgp4004 (talk) 16:40, 14 June 2024 (UTC)

Having experimented a little, it seems to be a problem very specific to the figure of 90km2.
  • 89km2 converts correctly to 34 sq mi.
  • 91km2 converts correctly to 35 sq mi.
  • But 90km2 concerts incorrectly to 30 sq mi.
Very bizarre. Dgp4004 (talk) 16:51, 14 June 2024 (UTC)
Likewise, I have noticed that the template is inaccurately converting 5,181 km2 to 2,000 sq mi on the Powys page. It should be 2,003 sq mi.
Would it not make sense to use template:convert in the infobox rather than the formulas used presently which don't seem to work?
Dgp4004 (talk) 08:53, 16 June 2024 (UTC)
Probably; this template is old and likely had much of its features written/created before {{convert}} was as good or widely-used as it is now. Primefac (talk) 15:40, 16 June 2024 (UTC)

A few comments here:

  • 5181 km2 should convert to 2000.3 mi2, not 2003. The template is behaving correctly in this case.
  • The value 90 km2 is ambiguous: it's unclear whether it has one or two significant figures. The template assumes it has one significant figure, hence does the conversion like {{convert|90|km2|mi2|abbr=on|sigfig=1}} → 90 km2 (30 sq mi). There's currently no way to specify significant figures to the template.
  • {{convert}} has a more clever way of determining rounding, so it does the conversion more like you expect: {{convert|9000|km2|mi2|abbr=on}} → 9,000 km2 (3,500 sq mi). You may not consider this correct, however, since it only preserves 2 significant figures.
  • Probably the right thing to do is to substitute {{convinfobox}} for {{Infobox settlement/areadisp}}. I'll experiment with this in the sandbox.

hike395 (talk) 02:40, 18 June 2024 (UTC)

Sadly, {{convinfobox}} only accepts up to 3 units, while {{Infobox settlement/areadisp}} can handle 5. {{Infobox settlement/areadisp}} also correctly sets the order of the displayed units according to country, while {{convinfobox}} always puts the specified unit first.
This can all be fixed if we port convinfobox over to Lua, which will take some amount of work. — hike395 (talk) 02:48, 18 June 2024 (UTC)
Thank you so much for looking into it—I wouldn't know where to start! Dgp4004 (talk) 07:27, 18 June 2024 (UTC)

Template-protected edit request on 9 August 2024

Add a parameter for flag_type, so that other options like banners can also be added (eg. State banners, municipal banners, county banners etc). Since the infobox Indian state or territory is a customised wrapper for this infobox, and it is explicitly mentioned that Indian states use banners and not flags (since they are only used for the official purpose by the government and not as the representation for the state), I did not want to add the parameter of flag to them, but rather of banner. Pur 0 0 (talk) 15:02, 9 August 2024 (UTC)

 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. – Jonesey95 (talk) 21:07, 10 August 2024 (UTC)

Mandatory hidden OpenStreetMap

Hi, an OSM map is required for all settlements, but nearly all the times it makes its Infobox ugly. I propose to place an OSM map for all instances of this template and then hiding that by using {{hidden begin}} and {{hidden end}} templates. But if needed, the editors can expand OSM by default by a parameter. Something like this:

Shiraz
Persian: شیراز
Shiraz
Shiraz skyline
skyline of Shiraz;
Flag of Shiraz
Nickname: 
City of Gardens
OpenStreetMap
Map
Shiraz is located in Iran
Shiraz
Shiraz
Location of Shiraz within Iran
Coordinates: 29°36′36″N 52°32′33″E / 29.61000°N 52.54250°E / 29.61000; 52.54250

Hooman Mallahzadeh (talk) 12:39, 5 September 2024 (UTC)

Sorry, why would it be required? It's optional per Wikipedia:Requests for comment/Mapframe maps in infoboxes
At the same time, what's the ugly part exactly? --Joy (talk) 22:40, 7 September 2024 (UTC)
Which reminds me, we never added the standard optional mapframe support here. I'll go check in the sandbox if I can do that now, IIRC the local code here was somewhat more convoluted than average. --Joy (talk) 19:02, 8 September 2024 (UTC)
I also do not see anything required about the mapframe map. I picked a few articles from a dab page and do not see one at Newton, Edmonton, or Newton, Surrey, or Newtown Cunningham, or Newton, Massachusetts. – Jonesey95 (talk) 11:46, 9 September 2024 (UTC)

UK should default to metric units

Why does this template display the imperial units first for UK places? All of the official data for geographical areas and statistical data is in km². So that should be displayed first. No need for an inaccurate conversion. Craobh àrd (talk) 03:11, 9 October 2024 (UTC)

Edit request 11 October 2024

Description of suggested change: Module:Settlement short description is used by the Infobox settlement template to create a default Short description. Sometimes this default is too long and the article is flagged in the maintenance category Category:Articles with long short description. To cope with this, the module has a "kill switch" (at line 82) so that, if the infobox includes short_description = no, then the module returns an empty SD and leaves the manual SD from the article to have effect. This kill switch has been in place since the first version of the module in January 2019. Sadly, the infobox template code does not include this parameter in the Check for unknown parameters list and so, in the few(?) articles where the kill switch has to be used, the edit preview displays a Preview warning: Page using Template:Infobox settlement with unknown parameter "short_description". This means that it can "reasonably" be removed as an error. See [1].

Diff: add short_description to the Check for unknown parameters list. Please re-sort the list at the same time — GhostInTheMachine talk to me 20:24, 11 October 2024 (UTC)

 DoneJonesey95 (talk) 13:40, 13 October 2024 (UTC)

Households and Precipitation

Please add these parameters. Lfstevens (talk) 20:53, 2 November 2024 (UTC)

No thank you. Nikkimaria (talk) 20:58, 2 November 2024 (UTC)
No, because too much stuff in the infobox already. • SbmeirowTalk09:02, 3 November 2024 (UTC)

mapframe support

Phew, [2] was annoying to do, but didn't actually seem particularly complex.

I noticed we actually have a test case already at Template:Infobox settlement/testcases2#Case 17: Chicago with mapframe

Any objections to making this go live? --Joy (talk) 19:38, 8 September 2024 (UTC)

As nobody raised any objections, it's in the template now, let's see what we find out with real-world testing. --Joy (talk) 08:31, 27 September 2024 (UTC)
There's been no feedback about this after a bit over a month?
I'll proceed to set the onByDefault parameter in case of no other maps are present, as we do elsewhere. --Joy (talk) 21:27, 2 November 2024 (UTC)
@Pppery can you give me an example so I can add a test case and fix it, please? --Joy (talk) 22:52, 3 November 2024 (UTC)
See current list of articles with Lua errors. Aïn El Hadid is one example. * Pppery * it has begun... 22:53, 3 November 2024 (UTC)
I think the root cause is a coordinates value that is either malformed (like in that example) or written without using {{coord}} (like in Ipelegeng). I've seen and fixed a lot of these as various smaller-scale templates get converted to mapframe maps, but the scale (over 100 errors at once) was bigger than I was willing to tackle so I reverted. * Pppery * it has begun... 22:58, 3 November 2024 (UTC)
Ah, so this is just a case of the new functionality exposing earlier issues. That's 150 errors in the list total, that's not paginated at 150, right? Given the 569K transclusions, that's not actually that bad :) --Joy (talk) 23:04, 3 November 2024 (UTC)
No, it's paginated (and entries are being removed as they were reparsed). But it's in alphabetical order and paginated more than half way through the alphabet, so the number of errors is still probably only a few hundred. The third case to handle is coordinates being missing and not on Wikidata either, like Nyongxar * Pppery * it has begun... 23:07, 3 November 2024 (UTC)
Or set to unknown value, like Sink, West Virginia * Pppery * it has begun... 23:07, 3 November 2024 (UTC)
Looks like other infoboxes are triggering them, too. I'm going through them one by one, it's a variety of circumstances. --Joy (talk) 23:11, 3 November 2024 (UTC)
OK so I think I went through half the list so far, confirming the extent of the issue. It's all article issues, I didn't find a single one that wasn't somehow deviating from either the infobox specification or the verifiability policy - a bunch of US ghost towns referenced to dead links. Will handle the rest later. --Joy (talk) 00:31, 4 November 2024 (UTC)
That list is dynamic, and only shows entries that displayed a Lua error the most recent time they were parsed, which happens on an edit to the page as well as by itself (that is, since your edit to the template was reverted, the errors are slowly going away). For future references, here's the list as it stands now:
Extended content
<cm ns="0" title="Maya Bigha"/>
<cm ns="0" title="Melakaveri"/>
<cm ns="0" title="Metagama"/>
<cm ns="0" title="Metikoš"/>
<cm ns="0" title="Minden, Lawrence County, Missouri"/>
<cm ns="0" title="Mirigama Divisional Secretariat"/>
<cm ns="0" title="Misteriosa Bank"/>
<cm ns="0" title="Mogullapalle"/>
<cm ns="0" title="Montrose Park, Pennsylvania"/>
<cm ns="0" title="Moscow Orphanage"/>
<cm ns="0" title="Nexus International University"/>
<cm ns="0" title="Nokhar"/>
<cm ns="0" title="Nutu"/>
<cm ns="0" title="Nyongxar"/>
<cm ns="0" title="Old Mokotów"/>
<cm ns="0" title="Olusosun landfill"/>
<cm ns="0" title="Oshimili North"/>
<cm ns="0" title="Palle Hapuwida"/>
<cm ns="0" title="Parnaguá"/>
<cm ns="0" title="Pathul"/>
<cm ns="0" title="Phalasia"/>
<cm ns="0" title="Pokharathok, Palpa"/>
<cm ns="0" title="Ponnavarayankottai"/>
<cm ns="0" title="Prang Ghar"/>
<cm ns="0" title="Prek Sbauv"/>
<cm ns="0" title="Punta Brava Golf Club"/>
<cm ns="0" title="Pussalakandura"/>
<cm ns="0" title="Qasam, Yemen"/>
<cm ns="0" title="Qingniwaqiao"/>
<cm ns="0" title="Radmilović"/>
<cm ns="0" title="Rawat Fort"/>
<cm ns="0" title="Ribnica, Croatia"/>
<cm ns="0" title="River North Gallery District, Near North Side, Chicago"/>
<cm ns="0" title="Rockville, Pennsylvania"/>
<cm ns="0" title="Rosario Bank"/>
<cm ns="0" title="Roxie, West Virginia"/>
<cm ns="0" title="Sagne, Mauritania"/>
<cm ns="0" title="Saint-Louis-du-Ha! Ha!"/>
<cm ns="0" title="Samanabad"/>
<cm ns="0" title="San Benito, Entre Ríos"/>
<cm ns="0" title="San Martín Zapotitlán"/>
<cm ns="0" title="Sangmai"/>
<cm ns="0" title="Seh Chah, Faryab"/>
<cm ns="0" title="Sekyedumase"/>
<cm ns="0" title="Sêrkog"/>
<cm ns="0" title="Serra Talhada"/>
<cm ns="0" title="Sershul Town"/>
<cm ns="0" title="Shahrak-e Saduqi"/>
<cm ns="0" title="Shivalik Enclave"/>
<cm ns="0" title="Šilovo (Lebane)"/>
<cm ns="0" title="Sink, West Virginia"/>
<cm ns="0" title="Skoura M'Daz"/>
<cm ns="0" title="Skydive Chicago Airport"/>
<cm ns="0" title="South Harrisburg, Pennsylvania"/>
<cm ns="0" title="Stadsdriehoek"/>
<cm ns="0" title="Stierjoch"/>
<cm ns="0" title="Sultaniya, India"/>
<cm ns="0" title="Swarth Fell"/>
<cm ns="0" title="Tabory, Ukraine"/>
<cm ns="0" title="Tajpur, Dildarnagar"/>
<cm ns="0" title="Tanza, Navotas"/>
<cm ns="0" title="Tchibanga Airport"/>
<cm ns="0" title="Thayyur"/>
<cm ns="0" title="Thiruppachethi"/>
<cm ns="0" title="Thirupuvanam, Sivaganga"/>
<cm ns="0" title="Tigrinhos"/>
<cm ns="0" title="Tilaknagar"/>
<cm ns="0" title="Tofkian"/>
<cm ns="0" title="Tseboum Soumdo"/>
<cm ns="0" title="Tsekankan, California"/>
<cm ns="0" title="Tsemkhog"/>
<cm ns="0" title="Tunjungan Plaza"/>
<cm ns="0" title="Uddemarri"/>
<cm ns="0" title="Újcsanálos"/>
<cm ns="0" title="Uppariguda"/>
<cm ns="0" title="Urbasa"/>
<cm ns="0" title="Urdok Ridge"/>
<cm ns="0" title="Ustoma, California"/>
<cm ns="0" title="Valakom, Kottarakara"/>
<cm ns="0" title="Valdecaballeros"/>
<cm ns="0" title="Vandalia Municipal Airport"/>
<cm ns="0" title="Venmankondan (East)"/>
<cm ns="0" title="Waghjan"/>
<cm ns="0" title="Waikkal"/>
<cm ns="0" title="Walapane"/>
<cm ns="0" title="Waterdown, Ontario"/>
<cm ns="0" title="Wazirabad, Gurgaon"/>
But once you redeploy the edit it's possible that new articles will have errors in the same list that didn't show up before, because the parser sometimes does that. * Pppery * it has begun... 00:45, 4 November 2024 (UTC)

Do you think it's acceptable that we do this in batches like that? IOW, that we clean up a bunch that we see, then enable the code again, then after e.g. one day of random cache purges we look at it again, reassess whether we need to undo the showing of the error and do more clean up, rinse and repeat? --Joy (talk) 08:56, 4 November 2024 (UTC)

Maybe there's a way to more subtly detect if the coordinates value is not wrapped in {{coord}}, and make a hidden tracking category for that? --Joy (talk) 08:57, 4 November 2024 (UTC)
@Hike395 I remember you adding some magic recently to a related template, could I trouble you to ponder if there's a way to check for bad |coordinates= formatting here? It needs to be {{coord}}, but sometimes people enter it free-form (even if there is a formatted coord at the bottom of the article, d'oh). --Joy (talk) 17:54, 4 November 2024 (UTC)
I also tried to use bambots template param tool to weed out the syntax errors, but it was only tangentially related to this issue, there must be too many distinct |coordinates= values so it doesn't render them. --Joy (talk) 10:54, 5 November 2024 (UTC)
There isn't a specific tool related to checking coordinates, but I'm experimenting with a general piece of code that catches errors in module calls and lets you put those into tracking categories. No luck yet. — hike395 (talk) 12:26, 5 November 2024 (UTC)
I'd wrap the invocation of infobox mapframe with #iferror: and add a tracking category if there's an error, at least until all the coordinates are fixed:
{{#iferror: {{#invoke:Infobox mapframe|...}}|category|{{#invoke:Infobox mapframe|...}} }}
Also, a search like this might help. Ponor (talk) 13:13, 5 November 2024 (UTC)
Because Infobox mapframe is used blindly, I think it'd be wise to add something like Special:Diff/1255559502 in the temolate. Up to you! Ponor (talk) 15:33, 5 November 2024 (UTC)
Yes, that's exactly what I had in mind. Thanks!
A few minutes ago I also realized I can search for some of the common pitfalls, like this for misplaced coord missing calls. Good thing it's not common. --Joy (talk) 18:05, 5 November 2024 (UTC)
BTW because of transclusion here, {{Ifnoerror then show}} immediately became a high risk template so I protected it. You'd have to apply for the Wikipedia:Template editor permission to continue to edit it. --Joy (talk) 18:19, 5 November 2024 (UTC)
Allow me to also ping @Qwerfjkl and @Hike395 for a review of this somewhat new code. --Joy (talk) 18:21, 5 November 2024 (UTC)
Joy, well, I have no idea what I wanted {{iferror then show}} for, but good to see it's useful for something (and more to the point, {{ifnoerror then show}} is). — Qwerfjkltalk 19:08, 5 November 2024 (UTC)
Apparently Template:United States presidential election results table row (Diff ~1080169510). — Qwerfjkltalk 19:14, 5 November 2024 (UTC)
I brought it down to 11 either unrelated ones, or nicely formatted ones - a few American ghost towns where the error is about no coordinates in Wikidata. I'll re-enable it again then, and see if and how the backlog fills up again. --Joy (talk) 10:14, 4 November 2024 (UTC)
They're trickling in rather slowly, I only got a handful in the last few hours. I suppose that's actually good - the old cached versions without visible errors generally stay up, and only rarely get rendered again with the error. --Joy (talk) 14:04, 4 November 2024 (UTC)
From the looks of it, this issue has been generally addressed by now. The last few fixes I did were mostly about recent edits. The numbers at Template:Infobox settlement#Tracking categories show this issue to be in a markedly better shape than the average :) --Joy (talk) 10:52, 8 November 2024 (UTC)

Can you added a optional parameter to collapse the map, like they did for municipalities in the Philippines? See for example Manila. Thanks. -- P 1 9 9   14:58, 4 November 2024 (UTC)

That was apparently implemented with an image_map1 that uses {{hidden begin}} to transclude {{Infobox mapframe}} inside. Would we want to just do that kind of wrapping inside infobox dataN parameters? I don't know, it seems very intricate for something so optional. --Joy (talk) 17:42, 4 November 2024 (UTC)
I understand that it is not implemented the same, it was just an example of collapsed/hidden map. I was hoping that the Infobox mapframe already had such an option, but I see that it doesn't. This might be too complicated for now, because it would require editing Module:Infobox mapframe or even Module:Mapframe. Thanks anyway. -- P 1 9 9   18:43, 4 November 2024 (UTC)
@P199 you can bring it up at Template talk:Infobox mapframe and see if someone can implement something to this effect. --Joy (talk) 08:18, 5 November 2024 (UTC)

And one more important thing: default width of mapframe should be 250 (not 270, as taken from Module:Infobox mapframe) to match the default widths of other maps in this infobox. Thanks. -- P 1 9 9   15:08, 4 November 2024 (UTC)

Sure, we can synchronize that. --Joy (talk) 17:43, 4 November 2024 (UTC)

Sorry, I was asleep while this developed. What you're doing is fine with me. * Pppery * it has begun... 18:03, 4 November 2024 (UTC)

Thanks. In the meantime it seems to be trickling in at a slow pace, so it seems manageable so far. --Joy (talk) 19:00, 4 November 2024 (UTC)
It seems like this sort of edit (adding mapframe=no when coordinates are not present) should not be necessary. – Jonesey95 (talk) 13:47, 6 November 2024 (UTC)
It seems to come about from being on by default when no other map is present, but then when no other coordinate sources are present it does a lookup for them into wikidata, and then in turn that generates an explicit error message in the odd cases.
Should we just preclude onByDefault if there's no value in the coordinates parameter? --Joy (talk) 17:05, 6 November 2024 (UTC)
After having said that, I realized that this relates to #using wikidata as fallback at least?. --Joy (talk) 17:12, 6 November 2024 (UTC)
I just realized there's another way to alleviate this problem - set a pushpin map parameter on those locations. The location map template won't render because its precondition is both pushpin_map and coordinates, but it will implicitly disable mapframe.
At the same time, it does make sense to at least specify a country / state in the pushpin map parameter even for ghost towns we don't know the coordinates of, that much we always have to know. --Joy (talk) 07:54, 7 November 2024 (UTC)