Page MenuHomePhabricator

Page.categories withSortKey ignored
Closed, ResolvedPublic

Description

Site.pagecategories in core does not accept the parameter withSortKey which was present in compat, and no alternative implementation is available.

Page.categories in core even exposes a withSortKey parameter, which is passes to Site.pagecategories, only for it to be ignored.


Version: core-(2.0)
Severity: major

Related Objects

StatusSubtypeAssignedTask
InvalidNone
ResolvedTol

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:51 AM
bzimport set Reference to bz73561.
bzimport added a subscriber: Unknown Object (????).

Change 148619 had a related patch set uploaded by John Vandenberg:
Add param "from_raw_text", "props" to Page.categories()

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

Change 174143 had a related patch set uploaded by John Vandenberg:
Page.categories parameter withSortKey ignored

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

(In reply to John Mark Vandenberg from comment #0)

Page.categories in core even exposes a withSortKey parameter

fwiw ... withSortKey parameter isnt in the compat method arguments. However the sort key is populated by getCategoryLinks , which is called by Page.categories if the site doesnt have an API.

Change 174143 merged by jenkins-bot:
Page.categories parameter withSortKey ignored

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

Xqt triaged this task as High priority.May 28 2017, 11:56 AM
Tol subscribed.

I can try to do this — I've got a fix mostly working (using pywikibot.data.api.PropertyGenerator and yielding pywikibot.Categorys, with preloadpages if content) already.

Change 787784 had a related patch set uploaded (by Tol; author: Tol):

[pywikibot/core@master] Implement param with_sort_key in Page.categories()

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

Tol removed Tol as the assignee of this task.Oct 16 2024, 3:18 PM
Tol claimed this task.

Reassigning per email

rX

Reassigning per email

@Tol: could you rebase your patch.

@Tol: could you rebase your patch.

Done

Change #787784 merged by jenkins-bot:

[pywikibot/core@master] Implement param with_sort_key in Page.categories()

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