Module talk:Coordinates
|
||
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
All Coordinates on Welsh Language Wikipedia have stopped working
Can someone take a look at w:cy:Copaon_yr_Alban_Adran_3-4 and ALL coordinates. I'm not sure when they stopped working; it may have been when I imported this module. Many thanks. Llywelyn2000 (talk) 13:50, 3 December 2013 (UTC)
- If you click on the script error it gives you an error message which might give you a clue about what went wrong. In this case the error is "module `Module:Math' not found", so it looks like you also need to import Module:Math. Try that and see if it fixes your problem. — Mr. Stradivarius ♪ talk ♪ 13:54, 3 December 2013 (UTC)
- Music to my ears! Many thanks for the tip. How do I now change the word 'Coordinates' (which are down twice: w:cy:Llyn Cefni) to 'Cyfesurynnau'? We're getting there! Llywelyn2000 (talk) 14:44, 3 December 2013 (UTC)
- One of those looks to be the link on line 28 of the module; not sure about the other one just yet. There are also a load of categories which are specific to the English Wikipedia (some of which are my fault). It looks like someone needs to go through this module and internationalise it properly, so that all you have to do is update a config file. That might take a while, though (unless Dragons flight wants to have a go at it...?). Anyway, try changing the link on line 28 and see what that does. — Mr. Stradivarius ♪ talk ♪ 15:02, 3 December 2013 (UTC)
- Music to my ears! Many thanks for the tip. How do I now change the word 'Coordinates' (which are down twice: w:cy:Llyn Cefni) to 'Cyfesurynnau'? We're getting there! Llywelyn2000 (talk) 14:44, 3 December 2013 (UTC)
@Mr. Stradivarius, Redrose64, and Dragons flight: The problem returned yesterday cy:Afon Gwy. The problem is in the mouth of the river... somewhere! Thanks! It's also back in many others, in a different form - see here. Llywelyn2000 (talk) 02:36, 19 May 2016 (UTC)
- The problem persists; and does not look good. If this can't be corrected then the only other option is to delete the infobox. Llywelyn2000 (talk) 08:35, 25 May 2016 (UTC)
Call of {{#coordinates:}}
Hello all, a module comments says: "In order to load coordinates into the database, the {{#coordinates:}} parser function must also be called, this is done automatically in the Lua version of {{coord}}." Where exactly is this mentioned Lua version of {{coord}} located? --Aschroet (talk) 11:12, 24 August 2015 (UTC)
- This is that module. That comment seems worded a little strangely. --Izno (talk) 11:15, 24 August 2015 (UTC)
- Thanks Izno, but i must ask one more detail. Which line of code is calling the parser function and passes the arguments? --Aschroet (talk) 11:21, 24 August 2015 (UTC)
- That part is also misleading--each parser function has a corresponding Lua implementation which is in this case more abstract than "coordinates" in specific (and yet more specific at a point). The main function at the end of the page
coordinates._coord(args)
and the following 10 or so lines make the call to Wikidata. Then the module as a whole processes that as called by the particular page or template of interest. --Izno (talk) 11:30, 24 August 2015 (UTC)- I do not get it. You are explaining how the main function calls Wikidata, but the {{#coordinates:}} parser function is called by the template, not the module. Moroever, calling Wikidata when the firsts two parameters are empty raises an error: "Invalid arguments have been passed to the {{#coordinates:}} function", so it is not currently a working option. --Vriullop (talk) 08:28, 26 August 2015 (UTC)
- Vriullop, you might try asking User:MaxSem. Frietjes (talk) 13:33, 12 September 2015 (UTC)
- #coordinates is not called in a module, it is called in Template:Coord. There is documentation on how #coordinates works at mw:extension:GeoData#Parser function. #coordinates is not related to wikidata, but it is used for things like Special:Nearby.--Snaevar (talk) 20:32, 21 September 2015 (UTC)
- Yep, if you want to pull coordinates in Lua, you also need to call {{#coordinates}} from Lua. Max Semenik (talk) 16:55, 2 December 2015 (UTC)
- I do not get it. You are explaining how the main function calls Wikidata, but the {{#coordinates:}} parser function is called by the template, not the module. Moroever, calling Wikidata when the firsts two parameters are empty raises an error: "Invalid arguments have been passed to the {{#coordinates:}} function", so it is not currently a working option. --Vriullop (talk) 08:28, 26 August 2015 (UTC)
- That part is also misleading--each parser function has a corresponding Lua implementation which is in this case more abstract than "coordinates" in specific (and yet more specific at a point). The main function at the end of the page
- Thanks Izno, but i must ask one more detail. Which line of code is calling the parser function and passes the arguments? --Aschroet (talk) 11:21, 24 August 2015 (UTC)
coords doesn't work from Wikidata
From the thread above, I'd expect that Template:coord would now work without longitude and latitude if those values are available in Wikidata. When I try:
- {{coord|display=title}}
on 2015 Colorado Springs shooting, I get the co-ordinates displayed, but also:
- Invalid arguments have been passed to the {{#coordinates:}} function
How do I get past this? Cheers, Bovlb (talk) 15:06, 29 November 2015 (UTC)
- Bovlb, see the thread directly above. or, try asking User:MaxSem. Frietjes (talk) 17:51, 1 December 2015 (UTC)
- Thanks. I don't see how the thread above helps me. I pinged User:MaxSem but I didn't get a substantive response. It still doesn't work. Is there anyone else who can help? Bovlb (talk) 19:31, 10 December 2015 (UTC)
- I guess not. I raised the same question at Template_talk:Coord#Using_coord_to_inherit_co-ordinates_from_wikidata in hopes of getting an answer. Bovlb (talk) 03:20, 29 December 2015 (UTC)
- Thanks. I don't see how the thread above helps me. I pinged User:MaxSem but I didn't get a substantive response. It still doesn't work. Is there anyone else who can help? Bovlb (talk) 19:31, 10 December 2015 (UTC)
We don't have consensus to use values returned from Wikidata outside of infoboxes. But if you want to get coordinates from Wikidata into an infobox, I've got a working Lua function that fetches coordinates from Wikidata and passes the values through {{Coord}} at Module:WikidataIB, and an example of how you might code it in an infobox at Template:Sandbox/Infobox biosphere reserve. --RexxS (talk) 21:39, 1 June 2016 (UTC)
Template-protected edit request on 30 August 2016
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could the module sandbox be merged into the main module? This change adds two functions for injecting and extracting values of a {{Coord}} transclusion for use in infobox templates only. See Help:Coordinates in infoboxes for more information on why this is necessary. Thanks, Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 09:43, 30 August 2016 (UTC)
- Has this been discussed anywhere? Have the changes been extensively tested? Regards — Martin (MSGJ · talk) 09:15, 31 August 2016 (UTC)
- @MSGJ: A while ago there was an RfC which concluded with the result that all coordinates-related parameters in infoboxes should be replaced by
|coordinates=
. Injecting parameters is useful for some infoboxes that currently add them by default (such astype:railwaystation
for {{Infobox station}}) and extracting parameters would be useful for templates (including other parts of the infobox) which use the infobox's coordinate values. I've tried testing it in preview mode so that it doesn't generate any errors, but it's still unlikely given that the functions are only supposed to be used in infoboxes. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 09:25, 31 August 2016 (UTC) - (edit conflict) @MSGJ: The requestor has stated that this request is backed by this RfC.—Godsy(TALKCONT) 09:28, 31 August 2016 (UTC)
- Thanks for clarifying. I have made the change — Martin (MSGJ · talk) 09:34, 31 August 2016 (UTC)
- @MSGJ: A while ago there was an RfC which concluded with the result that all coordinates-related parameters in infoboxes should be replaced by
TPE on 11 Sep 2016
It is requested that an edit be made to the fully protected module at Module:Coordinates. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · test cases · 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 fully 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 module's sandbox and test them thoroughly here 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 |
Could the sandbox versions of this module and {{Coord}} be merged into the main versions of each? This change would move the parser function {{#coordinates:}}
into the module, allowing Wikidata to be used without generating errors, and would allow coordinates with latitude before longitude. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 16:23, 11 September 2016 (UTC)
- @Jc86035: Some questions before a potential sync, since this is is very heavily transcluded. 1. What has been the extent of your testing and validation that your change in the module (and removal in the template) works correctly? 2. Despite WP:PERF, Could it have been possible to request this change in August and do a more cumulative sync to avoid having to edit twice to avoid server strain when possible? — Andy W. (talk · ctb) 17:18, 11 September 2016 (UTC)
- @Andy M. Wang: Removing edit request; there are a few changes I'd like to make to the
p._coordinsert
function first. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 02:14, 12 September 2016 (UTC) - @Andy M. Wang: Reactivated edit request; additional changes didn't work. Tested original conditions in Module talk:Coordinates/testcases (all test failures are due to the addition of the parser function and are expected) and Template:Coord/testcases. (TL;DR: Could the sandbox versions of this module and {{Coord}} be merged into the main versions of each?) Thanks, Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 13:27, 13 September 2016 (UTC)
- @Andy M. Wang: Removing edit request; there are a few changes I'd like to make to the