{"record":{"id":"626c1e53688649f9","repo":"Semantic-Org/Semantic-UI","slug":"cookie-is-not-included-a-storage-solution-is-re","errorCode":null,"errorMessage":"$.cookie is not included. A storage solution is required.","messagePattern":"\\$\\.cookie is not included\\. A storage solution is required\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/modules/nag.js","lineNumber":479,"sourceCode":"    hide : 'slide'\n  },\n\n  context       : false,\n  detachable    : false,\n\n  expires       : 30,\n  domain        : false,\n  path          : '/',\n\n  // type of storage to use\n  storageMethod : 'cookie',\n\n  // value to store in dismissed localstorage/cookie\n  key           : 'nag',\n  value         : 'dismiss',\n\n  error: {\n    noCookieStorage : '$.cookie is not included. A storage solution is required.',\n    noStorage       : 'Neither $.cookie or store is defined. A storage solution is required for storing state',\n    method          : 'The method you called is not defined.'\n  },\n\n  className     : {\n    bottom : 'bottom',\n    fixed  : 'fixed'\n  },\n\n  selector      : {\n    close : '.close.icon'\n  },\n\n  speed         : 500,\n  easing        : 'easeOutQuad',\n\n  onHide: function() {}\n","sourceCodeStart":461,"sourceCodeEnd":497,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/nag.js#L461-L497","documentation":"Emitted by Nag's storage set()/get() (nag.js:211-212 and nag.js:230-231) when the configured storageMethod is unavailable (localStorage/sessionStorage not accessible) and the cookie fallback also fails because $.cookie === undefined. On set, nag returns without persisting; on get, the stored value is undefined. It is a console.error (nag.js:310), not thrown.","triggerScenarios":"settings.storageMethod:'cookie' (or a storage backend that is unavailable) while the jQuery cookie plugin is not loaded, so the fall-through at nag.js:207/227 hits the else branch.","commonSituations":"Removed jquery-cookie dependency, private/incognito mode blocking storage, file:// or sandboxed iframes where localStorage throws, storageMethod set to a backend the environment does not support.","solutions":["Include the jQuery cookie plugin so $.cookie is defined.","Set settings.storageMethod to a backend that is actually available in your environment.","Guard localStorage access for environments (incognito/sandbox) where it throws."],"exampleFix":"// before\n$('.nag').nag({ storageMethod: 'cookie' }); // no $.cookie -> error\n// after: load jquery.cookie first, OR\n$('.nag').nag({ storageMethod: 'localstorage' }); // where localStorage is available","handlingStrategy":"fallback","validationCode":"// Pick an available storage backend before initializing nag; fall back to memory.\nfunction pickStorage(){\n  try {\n    if (window.localStorage) return 'localstorage';\n    if (window.sessionStorage) return 'sessionstorage';\n  } catch(e) { /* localStorage can throw in sandboxed/incognito */ }\n  if ($.cookie !== undefined) return 'cookie';\n  return null;\n}\nvar backend = pickStorage();\nif (backend) {\n  $('.nag').nag({ storageMethod: backend });\n} else {\n  console.warn('No storage backend available; nag state will not persist.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include the jQuery cookie plugin if you rely on cookie storage.","Wrap localStorage access in try/catch for incognito/sandboxed iframes where it throws.","Validate that the chosen storageMethod actually works in the target environment."],"tags":["nag","storage","cookie","dependency"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}