Last modified: 2008-12-14 17:40:07 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 T17579, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15579 - clshow considers all categories !hidden
clshow considers all categories !hidden
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
: patch
Depends on: 15191
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-12 16:49 UTC by Brad Jorsch
Modified: 2008-12-14 17:40 UTC (History)
4 users (show)

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


Attachments
This should implement the query discussed in bug 15191 (1.02 KB, patch)
2008-12-14 17:19 UTC, Brad Jorsch
Details

Description Brad Jorsch 2008-09-12 16:49:13 UTC
The clshow parameter for prop=categories seems to consider all categories as being not hidden, or else the API's definition of "hidden" isn't what is shown as "Hidden categories" at the bottom of the article page. For example, the following query should return at least one category for every page returned since it is querying the categories of pages in a hidden category:

http://en.wikipedia.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:Pages_with_incorrect_ref_formatting&prop=categories&cllimit=max&clshow=hidden

However, at least in revision r40356, no categories are returned. All the categories, even the hidden one, are returned when !hidden is requested:

http://en.wikipedia.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:Pages_with_incorrect_ref_formatting&prop=categories&cllimit=max&clshow=!hidden

I notice that OutputPage.php does the "hidden category" thing in a completely different way.
Comment 1 Roan Kattouw 2008-09-12 19:13:54 UTC
Caused by bug 15191, but there seem to be no plans to fix it. I'll run the check against the page_props table, then.
Comment 2 Bryan Tong Minh 2008-10-20 14:05:18 UTC
There have to be some nasty LEFT JOINs. Something with

LEFT JOIN page ON (NS_CATEGORY, cl_to) = (page_namespace, page_title) LEFT JOIN page_props ON pp_page = page_id AND pp_propname = 'hidden' WHERE ...

Not nice.
Comment 3 Brad Jorsch 2008-12-14 17:19:35 UTC
Created attachment 5580 [details]
This should implement the query discussed in bug 15191

This patch should implement the query discussed in bug 15191:

> SELECT /*! STRAIGHT_JOIN */ cl_from,cl_to  FROM categorylinks LEFT JOIN page ON
> page_namespace = '14' AND page_title = cl_to LEFT JOIN page_props ON pp_page =
> page_id AND pp_propname = 'hiddencat'  WHERE cl_from IN ('85', '92', '111',
> '138') AND pp_propname IS NOT NULL ORDER BY cl_from, cl_to;
Comment 4 Roan Kattouw 2008-12-14 17:40:07 UTC
Modified patch applied in r44585.

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


Navigation
Links