Page MenuHomePhabricator

Allow use of the Lua API on a Wikibase repository
Closed, ResolvedPublic

Description

Allow to use the (maybe adapted) mw.wikibase Lua API on the Wikibase powered repositories in order to setup easily help pages like https://www.wikidata.org/wiki/Wikidata:List_of_properties


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=47930

Details

Reference
bz47071

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenFeatureNone
DuplicateNone
ResolvedNone
ResolvedNone
ResolvedNone
OpenNone
OpenNone
StalledNone
InvalidNone
OpenNone
ResolvedTpt
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedJarekt
ResolvedNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:25 AM
bzimport set Reference to bz47071.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 47862 has been marked as a duplicate of this bug. ***

A possible solution to fix easily this problem is maybe to implement in wikibase repo only a method, maybe shared with the client, getEntityFromId( id ) that returns the entity that has the given id.

For the repository, we may use the template dependency system in order to manage refresh of pages using this API. This method may be used:
Scribunto_LuaLibraryBase->getParser()->getOutput()->addTemplate( $title, $page_id, $rev_id )

I'm volunteer to try an implementation.

I've written a hack in the meantime that allows for some functionality by parsing the JSON page text: https://www.wikidata.org/wiki/Module:WBHacks

Related URL: https://gerrit.wikimedia.org/r/62321 (Gerrit Change I689a188e2374ab09d81c60e7edb99646b9472c3a)

Bug 47930 specifically asks for getEntityFromId (or equivalent). It's separate because 47930 can be fixed before adding it to the server.

As far as I'm aware, the current codebase already supports running both the repo and client extensions on the same wiki. It would need some testing and probably fixing some bugs, but there's no fundamental issue standing in the way of just enabling this.

Ah, sorry. While it'S true that this running client and repo on the same wiki, it's pretty useless without support for getEntityFromId() or similar. And we can only support than once we have full tracking of all item usages on the client. So it will have to wait...

Change 62321 abandoned by Tpt:
(bug 47071) Allow use of the Lua API on a Wikibase repository

Reason:
"we can just turn on client functionality on the repo"
I didn't believe it was possible. So, I abandon the change.

https://gerrit.wikimedia.org/r/62321

Once the Lua stuff has been moved into an own extension, which will probably happen mid-term, we can hopefully do that without to much pain.

  • This bug has been marked as a duplicate of bug 55570 ***

Shouldn't bug 55570 be a blocker of this?

I'd rather not keep open more bugs than necessary. We already have over 500.