Module talk:Coordinates: Difference between revisions

Content deleted Content added
 
(15 intermediate revisions by 9 users not shown)
Line 303:
|maxarchivesize = 75K
|counter = 2
|minthreadsleft = 47
|minthreadstoarchive = 12
|algo = old(90d365d)
|archive = Module talk:Coordinates/Archive %(counter)d
}}
Line 381:
:::@[[User:Redrose64|Redrose64]] I added a new fix to the sandbox. I also added testcases to cover the issue, although they need to be checked manually. <span class="nowrap">– [[User:BrandonXLF|<span style="color:blue;">Brandon</span><span style="color:green;">XLF</span>]] ([[User talk:BrandonXLF|talk]])</span> 23:59, 28 May 2023 (UTC)
::::{{ty}} The live module is now working as expected. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 19:40, 5 June 2023 (UTC)
 
== The [[Template:Coord]] template intersects articles' infoboxes/main text on [[Wikipedia:Vector_2022|Vector 2022]] (default skin) ==
 
{{Admin help|answered=yes}}
It appears as though the position of the template, when used under the <code>display=title</code> parameter, is '''absolute''' and cares little about neighboring [[Template:Infobox|infoboxes]], images, or suspected article text. This issue has far reaching implications, as seen in articles such as [[Andaman_Islands]], [[Operation Rheinübung]], [[Aegadian Islands]], [[Arabian Sea]], or even the [[United States]] articles, '''particularly''' when page width is at its slim default. The issue is mitigated when other minimal templates such as [[Template:Main]] are used, but this may be more rare than common. I request administrator help as the Module in question is [[WP:FULL|Fully Protected]], in addition to my inability to suggest a concrete improvement/<code>Template:Edit fully-protected</code> to solve this objective issue. I already have slight troubles editing Templates, but a Module is out of my expertise. I suspect it has to do with adding margin/changing the CSS display type somewhere but I'll leave the details to whomever picks this up. [[User:ZaptorZap|<span style="color:orangered;">Zaptor</span><span style="color:red;">''Zap''</span>]] ([[User_talk:ZaptorZap|<code style="color:purple">talk</code>]]) 02:14, 28 April 2023 (UTC)
 
:Please see [[Module talk:Coordinates#coordinsert feature broken|#Coordinsert feature broken]] up above, which already discusses this problem. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 08:46, 28 April 2023 (UTC)
::Oh, my bad. Sorry for the inapproproiate use of that template. [[User:ZaptorZap|<span style="color:orangered;">Zaptor</span><span style="color:red;">''Zap''</span>]] ([[User_talk:ZaptorZap|<code style="color:purple">talk</code>]]) 10:16, 28 April 2023 (UTC)
 
I've noticed this a lot in the last two days. Coincidence, or has something changed lately? Any solution that avoids the overlapping would be an improvement. {{ping|izno|TheDJ}} the list of [[Module_talk:Coordinates#Outstanding_problems_for_indicators|steps to fix indicators]] seems reasonable, are these waiting on new people to jump in or is there pushback elsewhere? <span style="color:#666">&ndash;&nbsp;[[User:Sj|SJ]][[User Talk:Sj|<span style="color:#f90;">&nbsp;+</span>]]</span> 14:03, 29 April 2023 (UTC)
 
:No coincidence. The sitesub header (with From wikipedia the free encyclopedia) has accidentally disappeared in last weeks' release, further aggravating this problem. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 14:27, 29 April 2023 (UTC)
:: I see, didn't notice that at first. Thanks to [[user:Izno|Izno]] for the [[phab:T335625|hackaround]]. We can pray for better release testing + reversion for regressions... but this seems another mark in favor of the indicator switch. <span style="color:#666">&ndash;&nbsp;[[User:Sj|SJ]][[User Talk:Sj|<span style="color:#f90;">&nbsp;+</span>]]</span> 14:40, 29 April 2023 (UTC), 02:47, 30 April 2023 (UTC)
 
== Updating this module to use Kartographer ==
 
Please see [[Wikipedia:Village pump (proposals)#RfC: Updating Template:Coord to use Kartographer]]. [[User:Galobtter|Galobtter]] ([[User talk:Galobtter|talk]]) 06:24, 10 May 2023 (UTC)
 
== Lua errors ==
 
Recent edits to this module seem to have caused Lua errors to appear at a bunch of articles, such as [[Ferry Point International Bridge]] and [[Calvert Marine Museum]] [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 14:55, 21 May 2023 (UTC)
:I think it's due to switching to use the indicator tag. If coord is just using "display=title" then Module:Mapframe isn't seeing the the geohack url to parse. You can get the same error if you just used "coordinates=x" in the infobox. The article can be fixed by changing the coord params to "display=inline,title" but the Module:Mapframe should be improved to fail more gracefully when it can't find a coord value. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 15:22, 21 May 2023 (UTC)
:: Error handling aside, shouldn't that use case be supported? Presumably the same fix that worked for coordinsert above (which I don't fully understand) should work for this case too. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 18:23, 21 May 2023 (UTC)
::: There does seem to be a row in the infobox though with just Coordinates as a title and a blank area to the right of that if just the display=title option is used. So another option is to move the coords outside of the infobox if just the title option is desired. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 18:43, 21 May 2023 (UTC)
:: {{ping|BrandonXLF}} in case you are interested in this. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 18:24, 21 May 2023 (UTC)
:::@[[User:Pppery|Pppery]] The error is caused by the call to <code>frame:preprocess</code> at [[Module:Mapframe#L-599]], but I'm not sure why it's there in the first place. @[[User:Evad37|Evad37]] Do you know if it would be safe to remove the call to <code>frame:preprocess</code>? <span class="nowrap">– [[User:BrandonXLF|<span style="color:blue;">Brandon</span><span style="color:green;">XLF</span>]] ([[User talk:BrandonXLF|talk]])</span> 10:00, 22 May 2023 (UTC)
 
This problem appears to occur in general when the rare {{para|display|title}} is used rather than the much more common {{para|display|inline,title}}. I set [[German Museum of Technology]], which uses {{tl|Infobox museum}}, to use {{para|display|title}}, and it displays the error in preview. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 14:21, 23 May 2023 (UTC)
 
===LDS temples===
''I wrote the following before noticing this section, I guess this is the same issue?''<br>A recent edit has led to "Lua error in Module:Mapframe at line 384: attempt to perform arithmetic on local 'lat_d' (a nil value)" in many articles ([https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmprop=title&cmlimit=500&cmnamespace=0&format=xml&cmtitle=Category:Pages_with_script_errors list]), for example [[Helsinki Finland Temple]] which uses {{tl|LDS Temple/Helsinki Finland Temple}} as in:
*<code><nowiki>{{ LDS Temple/Helsinki Finland Temple |format= Infobox LDS Temple }}</nowiki></code>
I guess the problem is that {{tl|Infobox LDS Temple}} includes <code><nowiki>{{coord|...|display=title}}</nowiki></code>. The article is somehow pulling the coordinates from {{Q|Q2603891}}. I'm dropping this here as a start for others to continue an investigation. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 08:02, 22 May 2023 (UTC)
:Are you sure that the article is pulling "60°13'30"N, 24°46'54"E" from Wikidata and then displaying "Coordinates: 60°13′30.69479″N 24°46′54.42599″E", the value from {{tl|LDS Temple/Helsinki Finland Temple}}? That seems like it is not happening. Regardless, removing {{para|display|title}} from {{tl|LDS Temple/Helsinki Finland Temple}} makes the Lua error go away, but then the coordinates do not appear at the top of [[Helsinki Finland Temple]]. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 14:08, 23 May 2023 (UTC)
::Yes, you are right. I didn't look hard enough. Pretty weird situation but it's not really satisfactory to leave 150 articles with a big red error due to the recent change to this module. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 03:16, 24 May 2023 (UTC)
:::I've fixed those. I made sure all the "Template:LDS Temple/" subpages has type:landmark in their coords params, then removed coordinsert from [[Template:Infobox LDS Temple]] and then updated those that just had display=title to also have inline. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 06:38, 24 May 2023 (UTC)
::::Thanks. I don't know how coordinsert works but you have probably seen my comment at 05:06, 24 May 2023 below where I mention that it receives an indicator strip marker rather than coordinates. I guess that some of its usages involve coordinates being directly passed to the function, while attempts to pass what Module:Coordinates produces will now fail. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 07:18, 24 May 2023 (UTC)
 
== Coord2text ==
Line 505 ⟶ 468:
:::As you can see, I've already argued that this is a flawed expectation for how TemplateStyles should interact with TextExtracts.
:::We can probably work around this locally by adding the <code>noexcerpt</code> class. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 05:39, 6 June 2023 (UTC)
::::Independently of workarounds, this looks to me like a parsing bug, so I filed {{phab|T338204}} to report it to the maintainers. --[[User:JCrespo (WMF)|JCrespo (WMF)]] ([[User talk:JCrespo (WMF)|talk]]) 07:44, 6 June 2023 (UTC)
:Please:::Also seesounds [[Modulelike talk:Coordinates#coordinsertwe featureare broken|#Coordinsertprepending featuresomething broken]]instead upof above,the whichsafer alreadyoption discussesof thisappending problem.? —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 08:4628, 286 AprilJune 2023 (UTC)
:::::No? [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 16:59, 6 June 2023 (UTC)
:::After the recent edit to Module:Coordinates and an low-substance edit on [[Australia (continent)]] the coordinates no longer appear. The [https://en.wikipedia.org/api/rest_v1/page/summary/Australia_(continent) REST endpoint] is still picking up the empty p and newlines: <code>extract: "\n\n"; extract_html: "&lt;p>\n\n&lt;/p>"</code>. Yes, I think it was changing it from a div to a span that did this particular line in. I think we can fix this by changing the hidden inline back to a div and then doing a second passover looking for a div in <code>coordinsert</code>, or changing the regex to be a bit more greedy at the beginning by removing its dependence on the tag. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:12, 6 June 2023 (UTC)
 
== Protected edit request on 28 September 2023 ==
 
{{edit fully-protected|Module:Coordinates|answered=yes}}
Add a format=dec4 function to output decimal degrees rounded to four places from data entered as either DMS or higher precision DEC format. The [[Geographical Names Board of Canada|Canadian Geographical Names Database]], [[Geographic Names Information System]], and [[Ordinance Survey]] provide ___location information with seven decimal degrees of precision. The dec4 format will permit the input data to be checked with the original data source while displaying the more reasonable and compact four decimal degrees of precision (+/- 10 m). [[User:Buaidh|<span style="color:white;background-color:#770022;font-weight:bold;">&nbsp;Buaidh&nbsp;</span>]]<span style="font-size:75%;vertical-align:middle;"> [[w:User talk:Buaidh|talk]] [[Special:EmailUser/Buaidh|e-mail]]</span> 21:57, 28 September 2023 (UTC)
: {{not done}} This is a repost of [[Module talk:Coordinates/Archive 2#Protected edit request on 14 September 2022]], which was closed as needing to be sandboxed and tested. We're a year and two weeks later, and this still hasn't AFAICS been sandboxed and tested. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 22:16, 28 September 2023 (UTC)
 
== Interface-protected edit request 27 December 2023 ==
 
{{Admin helpsudo|Module:Coordinates|answered=yes}}
 
Please sync from [[Module:Coordinates/sandbox]] ([https://en.wikipedia.org/wiki/Special:ComparePages?page1=Module%3ACoordinates&rev1=1161270528&page2=Module%3ACoordinates%2Fsandbox&rev2=1192087921&action=&diffonly=&unhide=&diffmode=source diff]).
 
This adds a class and a data-gadget attribute to the span. For now, this is a no-op change. It is intended to facilitate a more performant way of loading the WikiMiniAtlas script, when coupled with the proposed changes in [[MediaWiki talk:Common.js#Class-triggered gadgets]]. – [[User:SD0001|<span style="font-weight: bold; color: #C30">SD0001</span>]] ([[User talk:SD0001|talk]]) 14:36, 27 December 2023 (UTC)
: {{done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 16:54, 27 December 2023 (UTC)
 
{{sudo|Module:Coordinates|answered=yes}}
As MediaWiki now supports category-based gadget load, we can switch to that. Please sync from [[Module:Coordinates/sandbox]] ([[Special:Diff/1192107975/1226463973]]). For now, this is a no-op as the gadget isn't actually defined. – [[User:SD0001|<span style="font-weight: bold; color: #C30">SD0001</span>]] ([[User talk:SD0001|talk]]) 20:17, 30 May 2024 (UTC)
:: {{ping|BrandonXLFdone}} in case you are interested in this. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 1800:2422, 2131 May 20232024 (UTC)
 
== coordinsert problem? ==
 
@[[User:Jonesey95|Jonesey95]] I recently found your [[de:Benutzer_Diskussion:Plenz/OSM_for_Wiki#Errors_at_en:Hatfield_Chase|old question]] on German WP. It could be because of a malformed Geohack link: "Infobox UK place" uses coordinsert which generates a broken string when "coord" got a "title" parameter: https://geohack.toolforge.org/geohack.php?pagename=Hatfield_Chase&params=53.528_N_0.893_W_&title=Tunnel+Pits_region:GB_type:city (see the splitted "params" seperated by the "title" parameter).
"coordinsert" assumes "params" always as last parameter? Which isn't true when "title" is used. [[User:DB111|DB111]] ([[User talk:DB111|talk]]) 09:10, 14 August 2024 (UTC)