i.e. get the target of a redirect.
Description
Description
Event Timeline
Comment Actions
Can't you use mw.Title for this? https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects
Comment Actions
@Bugreporater, if you have a item ID and you want to find out if it is a redirect than you can use
function folowRedirect(id) return mw.wikibase.getEntity(id).id end
It works, and folowRedirect('Q50940519') will give you "Q9178333". It is useful if working with whole entities.
Comment Actions
I agree, That is why I use this approach for pages where I load the whole entity anyway. Many infoboxes on commons are created based on item ID and for those we load the whole entity.