Last modified: 2014-07-31 22:16:48 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 T67507, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65507 - It should be possible to get entity id from page title
It should be possible to get entity id from page title
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks: 64515
  Show dependency treegraph
 
Reported: 2014-05-19 20:58 UTC by Michał Łazowik
Modified: 2014-07-31 22:16 UTC (History)
5 users (show)

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


Attachments

Description Michał Łazowik 2014-05-19 20:58:18 UTC
<DanielK_WMDE>	lazowik: EntityPerPage should provide a function for looking up the ID for a given Title; and/or there should be an inverse of the EntityTitleLookup interface.

This is needed e.g. for showing concept and export urls on action=info
Comment 1 Michał Łazowik 2014-05-20 13:35:05 UTC
What should be implemented? Function in EntityPerPage or new interface?
Also EntityPerPage has two related todos:
@todo: Combine with the EntityTitleLookup interface?
@todo: At least add a way to get page IDs!
Comment 2 Daniel Kinzler 2014-05-20 14:41:12 UTC
It's clear that we should have an getEntityIdForTitle function somewhere, but it's not clear to me where it should reside, and what the exact signature should be (in the future, we may have more than one entity on a page). 

For now though, I suggest to put that method into the EntityTitleLookup interface, and implemented it in EntityContentFactory (which implements EntityTitleLookup) like this:

  $id = $idParser->parser( $title->getText() )

This isn't 100% future proof, but will work for now. This should make it easy enough to change the logic later.
Comment 3 Gerrit Notification Bot 2014-05-21 20:39:41 UTC
Change 134727 had a related patch set uploaded by Michał Łazowik:
Add getting entity id from page title

https://gerrit.wikimedia.org/r/134727
Comment 4 Gerrit Notification Bot 2014-05-26 14:21:00 UTC
Change 134727 abandoned by Michał Łazowik:
Introduce EntityIdLookup

Reason:
Need to figure out a good place for that and do a bit of refactoring beforehand.

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

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


Navigation
Links