Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Drupal 8 using localStorage to store UI options. But ALL IEs denied localStorage access in Local Network (eg. localhost, 192.168.x.x). Therefore, some backend UI (eg. Block, toolbal) are broken.
Further tests:
@see #8
Same issue:
http://stackoverflow.com/questions/13102116/access-denied-for-localstora...
http://stackoverflow.com/questions/15031686/localstorage-on-ie8-ie9-with...
(Google "IE localstorage localhost", check out top 10 pages)
Proposed resolution
Add fallback solution
Comment | File | Size | Author |
---|---|---|---|
#12 | 11-26-2012 9-32-59 AM.png | 69.18 KB | droplet |
#4 | 11-26-2012 3-00-17 AM.png | 43.43 KB | droplet |
Comments
Comment #1
droplet CreditAttribution: droplet commentedComment #2
nod_there's been a couple benchmaks with cookies against localStorage, localStorage was better. It's good as long as we don't start storing images or several hundred BK of data in there. Right now it's for true/false and short strings values.
If IE10 fuck us up with localStorage we have to go with session storage, which isn't a big deal for toolbar, the show row weight value. If that doesn't work either I'll just give up on the whole thing and start the IE ranting.
For now let's try to get to the bottom of the issue first.
I don't have a Win8 to test on :(
Comment #3
das-peter CreditAttribution: das-peter commentedI've just tested this.
System: Win8 64x, IE10 with default (recommended) security settings.
Server: localhost (http://d8.localhost)
Besides the fact that I can't find the code mentioned in the stackoverflow.com issue:
if(window.localStorage.getItem('phone') == null)
Everything seems to work as expected, no error reports.
If I'm not wrong the toolbar uses to localStorage too (e.g.
localStorage.getItem('Drupal.toolbar.activeTab')
).And restoring the active tab after closing and re-opening the browser is working.
Comment #4
droplet CreditAttribution: droplet commentedI bet when you browser "http://d8.localhost", it popup a message to ask you to run it as local intranet (low security level). That's why it worked. Also work with run as admin. (just tested)
It's my default settings (reset all IE settings, and I'm not a daily IE user, so not touch it at all. same to all other Win8 users ?)
When "Enable Protected Mode" is selected, it's failed.
AFAIK, other browsers can disable localStorage, add a backup solution to drupal is good for every case.
Comment #5
nod_did you by any chance selected "no" and "never show this message again" when a website first tried to used localStorage?
Comment #6
droplet CreditAttribution: droplet commentedmy tests shows:
- If protected mode off, it's okay
- If run as admin, it's okay
I think W8 enabled protected mode & run as non-admin permission by default. It's the problem.
Comment #7
nod_how about sessionstorage, is that working at all?
Comment #8
droplet CreditAttribution: droplet commentedRun IE10 with "desktop" mode
sessionstorage: OK
localStorage: FAILED
Run IE10 with "run as admin"
sessionstorage: OK
localStorage: OK
Run IE10 with "InPrivate" mode:
sessionstorage: OK
localStorage: OK
Run IE10 with "protected mode" off
sessionstorage: OK
localStorage: OK
Run IE10 with Metro mode
sessionstorage: OK
localStorage:
http://example.com OK (broswing this site directly: test site)
http://192.168.56.2/localstorage_test.htm FAILED (test source file (added 10 counts each time, IE bug ?)
http://192.168.56.2/drupal8x FAILED
http://192.168.56.108/drupal8x/localstorage_test.htm FAILED (added 10 counts each time, IE bug ?)
Windows 8 has 2 mode: Desktop & Metro.
Desktop opens the app normally
Metro opens in full screen
Test Env: Windows 8 64 bits & IE10. Restore IE10 settings before tests.
Comment #9
nod_Thanks a lot for the extensive testing. I'll look into it. Not bound by feature freeze so it might get pushed to next week if nobody is up for it :) But it is strange that I haven't heard about that before.
That default config is a big fail. Anyway I'll pass on the IE bashing for now.
Comment #10
droplet CreditAttribution: droplet commentedEDITed #8, added funny case.
Comment #11
nod_das-peter tested with a proper domain, can you edit your host file to have something like http://d8.localhost/ and try again?
From what I read they disable it to avoid leaking data to other things, after all on your localhost anything under the ip has access to localstorage, cookies and all.
Comment #12
droplet CreditAttribution: droplet commentedNope.
das-peter, can you reset IE settings and test again ?
Comment #13
das-peter CreditAttribution: das-peter commentedI don't think I can reset settings, that was just the second time I opened IE on a machine which I just got. The first time I used it to download chrome, the second time was the test from above and this time I confirmed that I want to use the recommended security settings - on the first run I simply skipped this step as I don't intend to use IE...
From my point of view my settings are as untouched as it can get - as far as the Lenovo pre-installed Win8 hasn't a modified IE version.
I'm running the stuff in Desktop mode, my user-account has administrative privileges but I didn't run IE with the command "Run as administrator".
Comment #14
das-peter CreditAttribution: das-peter commentedI've just created another, non administrative, user on my machine and logged in with it.
Same behaviour, on first IE startup I confirmed that I'll use the recommended compatibility and security settings.
After that I accessed the drupal installation, logged in as admin and browsed around. Active tab was set properly and I didn't get any error alerts or messages in the console.
Comment #15
jessebeach CreditAttribution: jessebeach commentedLinked to #1846970: [meta] Responsive Toolbar follow-ups for followup.
Comment #16
jessebeach CreditAttribution: jessebeach commentedadded toolbar-followup tag
Comment #17
nod_Still happening?
Comment #18
droplet CreditAttribution: droplet commentedComment #18.0
droplet CreditAttribution: droplet commentedupdate
Comment #19
nod_IE10 Win8 64x
Reseted my settings as in #12, no errors shows up for http://drupal8/ or http://192.168.1.42/ (the drupal8 host points to the same IP).
Comment #20
droplet CreditAttribution: droplet commented@nod_,
Make sure you haven't turn on Intranet setting. ( Sometimes IE won't hint you to turn on )
Anyway, What will we do if it really exist ?? Don't want to waste anymore time on this topic.
Comment #21
shellbufton CreditAttribution: shellbufton commentedHi guys, not sure if this is relevant or not but I came across this while looking for a solution to the same problem. Anyway, according to this it seems to be a corrupt user profile in IE and not related to the site itself?
See final comment here:
http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/ie10-script5-...
Hope this helps.
Comment #22
droplet CreditAttribution: droplet commentedmost of time we could not ask commercial users to change their IE settings :)
Comment #22.0
droplet CreditAttribution: droplet commentedupdate issue
Comment #23
nod_2 years, any change in that issue?
Comment #24
nod_Droplet is maintainer now :D
Fallback solution, what you have in mind?
Comment #25
droplet CreditAttribution: droplet commentedhmm. I can't reproduce it myself anymore.
http://dev.modern.ie/tools/vms/
PS: for anybody may hit this errors, you can add your domains into trust zone.