Last modified: 2014-03-17 14:47:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47627, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45627 - Add wikidata revision id to article's html
Add wikidata revision id to article's html
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataClient (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Wikidata bugs
: need-volunteer
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-02 01:02 UTC by zhjyong
Modified: 2014-03-17 14:47 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description zhjyong 2013-03-02 01:02:09 UTC
Currently many wiki articles have started to use wikidata repository to get interwiki links. However, for a specific article html page, it is hard to know what is the wikidata revision used for page render. Then it is hard to sync-up wikitext's revision and wikidata's revision for that specific page.

Since we have put wikitext's revision number in an article html, a simple method to solve the above issue is also put wikidata revision number in article html.
Comment 1 Daniel Kinzler 2013-03-02 17:23:09 UTC
To give some context here: this is a request from Google's Wikipedia mapping team.
Comment 2 jeblad 2013-03-03 22:46:55 UTC
The revision from Wikidatas item can be in effect several places on the page. Is this about all those places or is it about an <meta> entry in the header?
Comment 3 zhjyong 2013-03-03 23:42:55 UTC
Based on my knowledge, one wiki article only reads one revision of wikidata even though it may include interlanguage links, infobox data, and/or list data, isn't it? 

If so, then it seems simpler to have an <meta> entry in the header. How do you think about it?
Comment 4 jeblad 2013-03-04 02:37:14 UTC
Something like this?
https://gerrit.wikimedia.org/r/#/c/51976/

Note that the revision stuff does not work, its just in there to show a codeflow. The item id stuff works.

In a client it seems like the page (article in wikipedia) either uses one revision everywhere, or either the sitelinks or the statements use a newer revision than the opposite. That mean we could list the revision for each block that might get out of sync with the rest.

I'm not sure how we can handle a page consisting of blocks from several revisions.. But in theory parts should be kept if they are not changed, so the last known revision should be good enough. There is a revision id in the change propagation, we could use that instead of trying to request it from the repo. In some newer changesets we keep the iten id for later, we could do the same for the items revision id. Unless anything triggers a rebuild of the page it can be assumed to use the same revision, and if only parts of the page changes the other parts would be the same anyhow. Yes that could work.
Comment 5 Daniel Kinzler 2013-03-05 21:17:35 UTC
@john: that looks like the right way to go, in principle. The original request was for an HTML comment though - MediaWiki already provides some, mainly for debugging. I like the meta tag, it's cleaner, but we could still add something like <!-- wikidata item q1234, rev 732784 --> to the end of the page, for good measure. What do you think?

Also note that getting the ItemContent from the EntityLookup as you do in your patch introduces performance issues, but that would be fixed via bug 45566.
Comment 6 Daniel Kinzler 2013-03-05 21:19:02 UTC
...quick follow-up: we could just put the item revision into the ParserOutput object, and use that in a hook later.
Comment 7 jeblad 2013-03-05 23:53:51 UTC
Yes, it is in a todo in the example code.
Comment 8 zhjyong 2013-05-10 03:37:00 UTC
Hi, 

Just want to know the progress of this bug. Have we decided to implement some mechanism for this bug? If so, what is the current status?  Thanks.
Comment 9 Andre Klapper 2013-05-10 11:29:42 UTC
zhjyong: No progress, otherwise it would be mentioned here...
Comment 10 Lydia Pintscher 2014-03-17 14:07:42 UTC
At this point a Wikipedia article indeed does only use data from one item. But this will change in the future. Is it a good idea to put all of the items and their revisions in the article's html?
Comment 11 Ricordisamoa 2014-03-17 14:47:00 UTC
(In reply to Lydia Pintscher from comment #10)
> At this point a Wikipedia article indeed does only use data from one item.
> But this will change in the future. Is it a good idea to put all of the
> items and their revisions in the article's html?

IMHO yes, but the item uniquely associated with the page should be tagged as "main".

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links