Details
-
Suggestion
-
Resolution: Unresolved
-
2
-
Description
Problem Definition
Questions users cannot post a question if third-party cookies are blocked on their browsers with the following error:
Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document
This happens if user changes their browser setting to block third-party cookies.
Since Question is implemented as add-on and its resources is hosted on the different domain from Confluence Cloud, users should enable third-party cookies.
However, the problem is Questions users cannot realise they need to change the setting.
Suggested Solution
Detect if localStorage is available and show the friendly notice not to block third-party cookies.
if (typeof window.localStorage !== 'undefined') { // SETUP SESSION, AUHT, LOCALE, SETTINGS ETC } else { // PROVIDE FEEDBACK TO THE USER }
Workaround
- For a Chrome user: go to chrome://settings/content/cookies (Settings > Content settings > Cookies), and make sure to enable "Allow local data to be set (recommended)" and disable "Block third-party cookies"