Module talk:ResolveEntityId: Difference between revisions

Content deleted Content added
Bug: new section
 
(One intermediate revision by the same user not shown)
Line 31:
:[[Module:Taxonbar]] or this module need to be made more robust so that a blank input does not cause an error &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 18:02, 8 March 2022 (UTC)
 
== Output for invalid input ==
== Bug ==
 
Could the module be made a bit more robust? If extrasomething contentinvalid is passed to the template, e.g.
<pre>{{#invoke:ResolveEntityId|entityid|"[[Kouga Dam]] ([[Paul Sauer Dam]])"}}</pre>
could it either fail gracefully by returning nil or even better, it could just take the first link and resolve that? At the moment we are getting "Lua error in Module:ResolveEntityId at line 32: attempt to index a nil value". Cheers &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:25, 2 November 2022 (UTC)
 
:Since I realised I had already requested this previously, I went ahead and made the corrections to the module. Hope there are no side-effects but testcases are working fine. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:34, 2 November 2022 (UTC)