Last modified: 2010-10-17 17:29:17 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 T22040, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20040 - output of categorytree generates secure paths in rare cases.
output of categorytree generates secure paths in rare cases.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CategoryTree (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Daniel Kinzler
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-02 14:40 UTC by Derk-Jan Hartman
Modified: 2010-10-17 17:29 UTC (History)
3 users (show)

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


Attachments
returned json output (4.45 KB, text/plain)
2009-08-02 14:40 UTC, Derk-Jan Hartman
Details
expand the memcached key with variant/http values with getPageRenderingHash (1.01 KB, patch)
2010-03-13 00:53 UTC, Derk-Jan Hartman
Details

Description Derk-Jan Hartman 2009-08-02 14:40:32 UTC
Created attachment 6414 [details]
returned json output

Ok,  on http://en.wikipedia.org/wiki/Category:Scouting
I uncollapse the category: "People associated with Scouting (6)"

Now when i hover the subcat links, my status bar indicates "http://en.wikipedia.org/wikipedia/en/wiki/Category:Bronze_Wolf_awardees"  Seems like it thinks it needs to use the secure server style for paths. The weird thing is that all the other subcategories of Scouting seem to uncollapse just just fine, with correct links.

Safari 4, Vector skin.

The request is:
http://en.wikipedia.org/w/index.php?action=ajax&rs=efCategoryTreeAjaxWrapper&rsargs[]=People_associated_with_Scouting&rsargs[]=%7B%22mode%22%3A%200%2C%20%22hideprefix%22%3A%2020%2C%20%22showcount%22%3A%20true%2C%20%22namespaces%22%3A%20false%7D&rsargs[]=json

The returned content is in the attachment.
Comment 1 Chad H. 2009-08-02 14:42:51 UTC
Confirmed in Monobook with Chrome 2.
Comment 2 Derk-Jan Hartman 2010-03-13 00:06:17 UTC
In function ajax() of CategoryTree/CategoryTreeFunctions.php 

# Retrieve page_touched for the category
$dbkey = $title->getDBkey();

$mckey = "$wgDBname:categorytree(" . $this->getOptionsAsCacheKey( $depth ) . "):$dbkey";

Since the ajax results differ in secure vs. non-secure (localURL layout differs), the memcached is incorrectly shared between these ajax results, thus causing this problem
Comment 3 Derk-Jan Hartman 2010-03-13 00:53:46 UTC
Created attachment 7194 [details]
expand the memcached key with variant/http values with getPageRenderingHash
Comment 4 Daniel Kinzler 2010-04-06 21:47:15 UTC
fixed in r64672. thanks Derk-Jan.
Comment 5 Platonides 2010-10-10 14:12:59 UTC
What do you mean with 'variant options'? $wgLang->getCode() ?

For secure, just $wgRenderHashAppend would be enough.
Comment 6 Platonides 2010-10-10 14:18:26 UTC
$wgContLang->getExtraHashOptions() . $wgRenderHashAppend would be enough, right?
Comment 7 Derk-Jan Hartman 2010-10-17 11:27:00 UTC
Variant options means zh-tw vs. zh-hs etc. Tim told me to use getPageRenderingHash() back then. I'm not sure if $wgRenderHashAppend takes user variants into account. Perhaps you should raise this in code comments if you really want it to be reviewed again ?
Comment 8 Platonides 2010-10-17 14:21:12 UTC
$wgContLang->getExtraHashOptions() contain the preferred language variant.

I'm not sure which CR would be appropiate for that. It was right back then. Now, I am trying to deprecate getPageRenderingHash() per r70783#c9984.

I think I will change it.
Comment 9 Derk-Jan Hartman 2010-10-17 14:51:31 UTC
I guess $wgContLang->getExtraHashOptions (for variant) and $wgRenderHashAppend (for secure) combined should do the trick. If you think that is better, then you should go right ahead.
Comment 10 Platonides 2010-10-17 17:29:17 UTC
Thanks. Done in r74903.

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


Navigation
Links