Module talk:ResolveEntityId: Difference between revisions

Content deleted Content added
Bug: new section
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)
 
== Bug ==
 
Could the module be made a bit more robust? If extra content 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)