Module talk:ResolveEntityId: Difference between revisions

Content deleted Content added
 
(2 intermediate revisions by the same user not shown)
Line 30:
<pre>{{Taxonbar|from1=|from2=Q106918135}}</pre>
:[[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 ==
 
Could the module be made a bit more robust? If something invalid is passed to the template, e.g.
<pre>{{#invoke:ResolveEntityId|entityid|[[Kouga Dam]]}}</pre>
could it fail gracefully by returning nil? 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)