Page MenuHomePhabricator

ULSPreferences get method erases the whole jStorage store
Closed, ResolvedPublic

Description

Instead of removing just the uls-preferences key, you bring down everything, including data stored by other extensions (namely Popups).

Steps to reproduce:

  1. Open a private window (to make sure there are no cookies) and vgo to https://el.wikipedia.org/ (because this wiki has HoverCards enabled by default).
  1. Hover an article link and click the gear icon inside the popup.
  1. Select the second option (Απενεργοποίηση προεπισκόπησης, that's greek for Disable preview) and click Αοιθήκευση (Save).
  1. At this point you are presented with instructiona how to enable preview again, and it is the right time to open the web console of your browser and type $.jStorage.get("mwe-popups-enabled") and verify that the preference is saved as false
  1. Press Εντάξει (greek for OK), the page realoads and now $.jStorage.get("mwe-popups-enabled") returns null Also try localStorage.jStorage to verify that the complete store is wiped.
  1. Hover an article link. A popup appears although it was disabled.

Event Timeline

P.a.a raised the priority of this task from to Needs Triage.
P.a.a updated the task description. (Show Details)
P.a.a subscribed.

Hi @P.a.a, thanks for taking the time to report this!
I'm not sure I understand the problem and how to reproduce it. Could you elaborate? Also see https://www.mediawiki.org/wiki/How_to_report_a_bug

Thank you in advance!

P.a.a set Security to None.

Hi @Aklapper, I thought that the bug was so clear that a test case would be redundant.

Amire80 triaged this task as Medium priority.May 28 2015, 1:02 PM
Amire80 added a project: Page-Previews.
Amire80 added a subscriber: santhosh.

Change 221851 had a related patch set uploaded (by Prtksxna):
Stop clearing jStorage's localStorage completely is the uls-preference is not found

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

Jdlrobson changed the task status from Open to Stalled.Sep 23 2015, 7:42 PM
Jdlrobson subscribed.

Seems to have stalled. How can we unstall this?

@Amire80, can the code block mentioned in the patch be removed completely?

Change 282648 had a related patch set uploaded (by Santhosh):
Clean up ULS localstorage preference saving system

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

santhosh changed the task status from Stalled to Open.Apr 11 2016, 5:00 AM
santhosh moved this task from Backlog to In Review on the Language-Q4-2016-Sprint 1 board.
santhosh added a subscriber: Language-Q4-2016-Sprint 1.
santhosh removed a subscriber: Language-Q4-2016-Sprint 1.

Change 221851 abandoned by Nikerabbit:
Stop clearing jStorage's localStorage if the uls-preference is not found

Reason:
Done in I3cfec447703. Thanks for your patience.

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

Change 282648 merged by jenkins-bot:
Clean up ULS localstorage preference saving system

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

Prtksxna reassigned this task from Prtksxna to santhosh.
Prtksxna removed a project: Patch-For-Review.
Prtksxna subscribed.