View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
16476Bug reportsQuestion editorpublic2021-03-10 21:05
Reporteruser230312Assigned Toollehar  
PrioritynoneSeveritypartial_block 
Status closedResolutionno change required 
Product Version4.2.5 
Summary16476: Browser localstorage gets full when editing many questions
Description

This issue is closely related to https://bugs.limesurvey.org/view.php?id=15063 but not resolved by its fix.
When editing survey questions, LS writes data to the browser's localstorage. The mainly problematic ones are the entries with key "lsquestionedit$id" and "lsquestiongroupedit$id". After editing a certain number of questions (unsure of exact number at the moment, client reported the issue), the localstorage will be full and will not accept more data.
This leads to JS errors, which in turn makes it impossible for the question editor to render correctly. Loading icon keeps spinning but doesn't do anything.

Steps To Reproduce
  1. Have several surveys with a lot of questions in them
  2. Edit multiple questions in the different surveys
  3. Observe browser's local storage getting full with above mentioned data
  4. When local storage is full, error will be thrown when opening a question: "index.js:232 Uncaught (in promise) DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'lsquestionedit_643891' exceeded the quota."
TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)4.2.5
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 10.3.22 (MariaDB)
Server OS (if known)
Webserver software & version (if known)
PHP Version7.3

Users monitoring this issue

davidmal

Activities

user230312

2020-07-09 11:37

  ~58823

Thinking ahead for a possible fix, I don't think switching to Session Storage will fix it in this case. On the contrary, it will get full faster because Session Storage has +-5MB size limit, whereas Local Storage usually has +-10MB (correct me if I'm wrong). If the user edits a lot of questions in one session, it'll get full pretty quickly.
So there will have to be a better mechanism to clear out the storage entries at certain intervals or triggers. One idea could be clearing the Local Storage every time the user switches to a different question group, but I'm not sure how consistent that behaviour would be. I'll leave it to the experts :)

DenisChenu

DenisChenu

2020-10-18 10:41

developer   ~60243

My proposition : don't use localStorage : admin gui is done to update Questins grope, question etc … then no need localStorage cleared a lot of time.
localStorage must be used for some "fixed or near" content …
My opinion :)

cdorin

cdorin

2020-11-11 09:50

reporter   ~60608

This issue will get solved once we finish the revert :) . Please wait for 4.4 and see if the issue persists. The revert process will be ironed out in 4.5

ollehar

ollehar

2021-03-10 21:05

administrator   ~63134

Fixed by Carsten.

Issue History

Date Modified Username Field Change
2020-07-09 11:17 user230312 New Issue
2020-07-09 11:37 user230312 Note Added: 58823
2020-10-18 10:41 DenisChenu Note Added: 60243
2020-11-10 13:33 davidmal Issue Monitored: davidmal
2020-11-11 09:50 cdorin Note Added: 60608
2020-11-11 09:50 cdorin Status new => acknowledged
2021-03-10 21:05 ollehar Assigned To => ollehar
2021-03-10 21:05 ollehar Status acknowledged => closed
2021-03-10 21:05 ollehar Resolution open => no change required
2021-03-10 21:05 ollehar Note Added: 63134
2021-08-03 07:09 guest Bug heat 8 => 10