Last modified: 2010-07-22 08:49:09 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 T25936, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23936 - Add "displaytitle" to query/info API
Add "displaytitle" to query/info API
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.17.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on: 14685
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-13 00:42 UTC by Pol
Modified: 2010-07-22 08:49 UTC (History)
7 users (show)

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


Attachments

Description Pol 2010-06-13 00:42:47 UTC
Some pages have a display title different from the title for instance the page "IPad" has a display title of "iPad".

The "parse" API correctly returns the display title:
http://en.wikipedia.org/w/api.php?action=parse&page=IPad
<?xml version="1.0"?>
<api>
  <parse displaytitle="iPad" revid="367656791">
  ...

But the "query" / "info" API does not:
http://en.wikipedia.org/w/api.php?action=query&prop=info&titles=IPad
<?xml version="1.0"?>
<api>
  <query>
    <pages>
      <page pageid="25970423" ns="0" title="IPad" touched="2010-06-12T20:42:33Z" lastrevid="367656791" counter="0" length="62248" />
    </pages>
  </query>
</api>

Please add a "displaytitle" attribute to the "query" / "info" API.
Comment 1 Sam Reed (reedy) 2010-06-13 01:26:27 UTC
Trivial, changing to enhancement (as that's what it is)

Just, unless i'm missing something, we're gonna have to pull the page text, and shove it through the parser to get it to deal with the title...
Comment 2 Roan Kattouw 2010-06-13 11:28:11 UTC
(In reply to comment #1)
> Trivial, changing to enhancement (as that's what it is)
> 
> Just, unless i'm missing something, we're gonna have to pull the page text, and
> shove it through the parser to get it to deal with the title...
That would be kinda ridiculous. It would be better to store the displaytitle in the page_props table, if it isn't already. The ParserOutput class has a nice interface for this (ParserOutput::setProperty()).
Comment 3 Sam Reed (reedy) 2010-06-13 13:07:05 UTC
I didn't say it was sane :P (hence the ellipse)
Comment 4 Roan Kattouw 2010-07-21 12:51:56 UTC
(In reply to comment #2)
> That would be kinda ridiculous. It would be better to store the displaytitle in
> the page_props table, if it isn't already. The ParserOutput class has a nice
> interface for this (ParserOutput::setProperty()).
This was done in r69235, which should make this bug rather trivial.
Comment 5 Bryan Tong Minh 2010-07-21 12:53:37 UTC
Note that wikis should run refreshLinks.php I think for this to work completely.
Comment 6 Roan Kattouw 2010-07-21 12:54:37 UTC
(In reply to comment #5)
> Note that wikis should run refreshLinks.php I think for this to work
> completely.
Yes, it won't be populated instantly, but the fact that it populates on edit or purge should be good enough.
Comment 7 Sam Reed (reedy) 2010-07-21 18:57:34 UTC
I'm presuming, if the user requests DisplayTitle, and the pageprops has nothing for the page for it's display title, just give the actual title?
Comment 8 Roan Kattouw 2010-07-21 23:11:58 UTC
(In reply to comment #7)
> I'm presuming, if the user requests DisplayTitle, and the pageprops has nothing
> for the page for it's display title, just give the actual title?
Yes. In the ideal world where the table is fully populated, that really does mean it'll be displayed that way. In the real world, it might be off because that page may not have its displaytitle written to the table yet, but I think that's acceptable.
Comment 9 Sam Reed (reedy) 2010-07-22 08:49:09 UTC
r67919

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


Navigation
Links