Module talk:Citation/CS1/Identifiers

From Wikiversity
Jump to navigation Jump to search

Lua error in Module:Citation/CS1/Identifiers at line 1014: attempt to compare nil with number., Wikidata Q36472504[edit source]

@Trappist the monk: @Bert Niehaus: What would you suggest be done to try to fix an error in this module?

{{Cite Q|Q36472504}} generates the following error:

  • Lua error in Module:Citation/CS1/Identifiers at line 1014: attempt to compare nil with number., Wikidata Q36472504
  • James Heckman; Seong Hyeok Moon; Rodrigo Pinto; Peter Savelyev; Adam Yavitz (1 January 2010), "Analyzing social experiments as implemented: A reexamination of the evidence from the HighScope Perry Preschool Program.", Quantitative Economics, 1 (1): 1–46, doi:10.3982/QE8, ISSN 1759-7323, PMC 3524308, PMID 23255883, Wikidata Q36472504

Thanks, DavidMCEddy (discusscontribs) 19:58, 23 August 2020 (UTC)

I think that whomever takes responsibility for the cs1|2 modules here has not kept all of them up-to-date. At the least, ~/Configuration not up-to-date. For example, it has a table id_limits{} that used to hold an upper-bounds limit value for |pmc= (among other identifier limits). Those values have been moved into the identifier handler tables. Your version of ~/Identifiers is expecting to find the |pmc= limit in the pmc handler table and when it doesn't, emits the error message that shows above.
So, what I think needs doing is that whomever takes responsibility for the cs1|2 modules here must ensure that all of the modules are updated when they are updated; selective updating is not at all recommended and rarely if ever works.
Trappist the monk (discusscontribs) 21:07, 23 August 2020 (UTC)
Thanks. How can we find if someone is officially responsible "for the cs1|2 modules here"? If someone is, how can we find that person? If that search fails to fix this problem, what do you suggest we do to try to recruit someone else to do that? Thanks again. DavidMCEddy (discusscontribs) 23:01, 23 August 2020 (UTC)
If en.wikiversity is anything like en.wikipedia, no one here is officially responsible for anything. Module history is a pretty good place to start. The offending module is Module:Citation/CS1/Configuration. Alas, that module's history seems muddled. It makes it look like I imported a new version on 11 July 2020; I did no such thing because I do not have import rights here (11 July 2020 is the date that I updated the en.wikipedia module suite). The next series of edits by Editor DannyS712 on 19 July 2020 somehow revert the import that I did not do and include additional changes. On 23 July 2020, Editor Evolution and evolvability apparently imports yet another version that makes no changes to the module.
I would start with those two editors.
Trappist the monk (discusscontribs) 10:54, 24 August 2020 (UTC)
@DannyS712: @Evolution and evolvability: Might one of you be able to fix the Lua error cited above? Thanks, DavidMCEddy (discusscontribs) 14:30, 24 August 2020 (UTC)
@DannyS712: @Evolution and evolvability: @Trappist the monk: Excuse me for late reply. I just imported the current state of the module to Wikiversity from with the Special:Import module from an operational Citation module from Wikipedia. I never performed another Special:import on an existing older module and I would hesitate to do so because of the template and module dependencies. I do not want to corrupt the citations because many learning resources in Wikiversity depend on that module, so we should be very careful with modifications of such modules. --Bert Niehaus (discusscontribs) 13:58, 26 August 2020 (UTC)
Are you sure that [you] just imported the current state of the module to Wikiversity from with the Special:Import module from an operational Citation module from Wikipedia. If you had, the Lua error... in the OP would not be there.
Trappist the monk (discusscontribs) 14:26, 26 August 2020 (UTC)
See history of module - 11:13, 7 December 2019 - 2 revisions imported from w:Module:Citation/CS1/Configuration --Bert Niehaus (discusscontribs) 05:49, 28 August 2020 (UTC)
@Bert Niehaus: Thanks for the comment. Do you know if the above cited Lua error was introduced by that change?
Template:Re: I do not know, if that was introduced by that import. It is more than 8 month since import. I guess the LUA error must be visible much earlier. --Bert Niehaus (discusscontribs) 15:42, 28 August 2020 (UTC)
I found this in visiting Research, Education and Economic Growth on or shortly before 2020-08-19. I don't know for sure, but I believe I would have noticed this problem when I created that article on 2018-10-05 and -06. Thanks again, DavidMCEddy (discusscontribs) 14:02, 28 August 2020 (UTC)
(Go for global templates) I would suggest to do a clean import again from Wikipedia. The difficult thing is to identify the dependencies, that might be more complicated than estimated. Asked Dave Braunschweig for an approach to maintain global templates and of course citation management belongs to that type of global templates. Template:Graph:Map or Template:Graph:Chart are other examples that should be maintained and updated for Wikipedia, Wikiversity, Wikispecies, WikiVoyage, WikiNews,... simultaneously. Those global templates can be parameterized with language specific parameters (e.g. Legend (english), Legende (german) for graphs). If a file in the dependencies during import already exists, then the import main not be complete. Inconsistencies in the version in the dependency tree e.g. in Wikiversity and Wikipedia may not be properly resolved. Dave mentioned that there was an approach for establishing global templates before, may be it is time to refresh or ask for that again. We address with that request a fundamental change in template management with the introduction of global interwiki templates update. From a computer science perspective that introduction makes a lot of sense to me, but the programming efforts must be covered. It is not a One-Hour-Job that someone could do easily. My personal favorite approach would be
  • to setup a new MediaWiki instance for Global Templates.
  • that Template-Wiki contains the Global Templates and the language parameterisation for en.wikis de.wikis, fr.wikis, es.wikis, ...
  • Template:MyGlobalTemplate contains also the language specifics variables and an export wikis in to a specific Wiki and Language is performed from the global templates wikis if language specific wiki domain (e.g. "en" and "wikiversity") is defined there.
  • a bot updates the global template into the language specific templates in Wikipedia, Wikiversity, WikiNews, ... if specified by the Global Template.
  • the bot updates local templates e.g. in english wikiversity and it is recommended to add a comment, that indicates: "This template should not be edited here, because it will be overwritten by a bot if the Global Template e.g. 'MyGlobalTemplate' is changed".
I do not know if that is an approach, that is feasible or acceptable by Wiki Community but may be the suggestion could be placed in the Wikiversity:Colloquium and the Wikipedia:Colloquium with a reference to this discussion and we wait how the community will respond to this suggestion. Maybe someone with more insights in the dependency resolver of templates import may have a better suggestion and she/he is welcome to propose better solution for Global Template management. Best regards, Bert --Bert Niehaus (discusscontribs) 09:39, 27 August 2020 (UTC)
That sounds very useful and appropriate.
Might it be feasible to include in that project making Template:Cite Q work in the Spanish-language Wikipedia? It currently works in 15 other language Wikipedias but not Spanish. Over 3 years ago I translated the Wikipedia article on w:Julia Cagé from French into English. I've wanted to translate it into Spanish, but I wanted to migrate the citations to Wikidata first. I don't know Spanish well enough to feel comfortable translating Module:Cite Q into Spanish, even if I knew Lua (which I don't). However, if you cannot find Wikimedians who know both Lua and Spanish, I might be able to help. DavidMCEddy (discusscontribs) 16:12, 27 August 2020 (UTC)
@Dave Braunschweig: This is still a problem. What would you suggest be done to try to fix it? Thanks, DavidMCEddy (discusscontribs) 05:09, 27 October 2020 (UTC)
I just posted a similar question to Wikidata:Project chat#Wikiversity:_Lua_error_in_Module:Citation/CS1. DavidMCEddy (discusscontribs) 05:13, 27 October 2020 (UTC)
What has to be done is to create a page generating the error and then look at all of the templates being called to generate the error. Each of those pages must be imported. I just did this. Going forward, anyone importing citation templates needs to be more thorough in what they import. Dave Braunschweig (discusscontribs) 01:21, 28 October 2020 (UTC)
Thanks. I foolishly did not create a list of all the places I saw it. However, I'm pretty sure I saw it in at least one of my "media and *" articles, and it seems to be gone from there. I also think I saw it in "Forecasting nuclear proliferation", and it's not there now. Thanks again. DavidMCEddy (discusscontribs) 01:49, 28 October 2020 (UTC)