Last modified: 2014-09-23 19:45:35 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 T27184, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25184 - Toolbar API: Unnecessary cookies are stored when inserting a booklet
Toolbar API: Unnecessary cookies are stored when inserting a booklet
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikiEditor (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-16 07:46 UTC by Michael M.
Modified: 2014-09-23 19:45 UTC (History)
3 users (show)

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


Attachments
Proposed patch (1.64 KB, patch)
2011-07-14 07:40 UTC, Michael M.
Details

Description Michael M. 2010-09-16 07:46:25 UTC
Steps to reproduce:
1. Delete all wikiEditor-* cookies.
2. Run the test script (./js/tests/wikiEditor.toolbar.js).
3. Look at the created cookies:

Two cookies are created, wikiEditor-0-booklet-colors-page and wikiEditor-0-booklet-removeme-page, both with value "colors" (which is the first page in the booklet containing the pages "colors" and "removeme").

Expected behavior:

Only one cookie for the opened section (wikiEditor-0-toolbar-section), and one for each booklet (wikiEditor-0-booklet-info-page, in this case) should be created, when the user opens something (this works as expected), but not one cookie for each page.
Comment 1 Michael M. 2011-07-14 07:40:10 UTC
Created attachment 8782 [details]
Proposed patch

In two places updateBookletSelection was called with the name of the page instead of the name of the section. The patch fixes this.
Additionaly, when only the default (i. e. the first) page is selected, storing this in a cookie isn't necessary, so I removed this, too.
Comment 2 Bugmeister Bot 2011-08-19 19:12:54 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 3 Sumana Harihareswara 2011-11-14 16:40:39 UTC
Michael, thank you for the patch, and my apologies that no one has reviewed it and responded yet.  I'm marking this bug with "need-review" as a keyword, to signal that this patch is awaiting code review.  Thanks again.  If you want to talk about your patch and get it reviewed faster, please feel free to visit #mediawiki in freenode IRC -- http://webchat.freenode.net/?channels=#mediawiki .
Comment 4 Sumana Harihareswara 2012-05-25 03:25:48 UTC
Michael: Thanks again for the patch.  Are you interested in using developer access to directly suggest it into our Git source control system?

https://www.mediawiki.org/wiki/Developer_access

https://www.mediawiki.org/wiki/Git/Workflow#How_to_submit_a_patch

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


Navigation
Links