| Issue 405: | TypeError in cookie read | |
| 3 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. add a sample tree (from Quick start) 2. run in browser (Chrome 24) 3. initialise the tree 4. browser reports "Uncaught TypeError: Cannot call method 'split' of undefined jquery.dynatree.js:2034", tree doesn't show What version of the dynatree and jQuery are you using? dynatree 1.24 jQuery 1.9.1 jQuery Cookie Plugin v1.3.1 On what operating system and browser? Mac Chrome 24 What DOCTYPE declaration are you using? <!DOCTYPE html> Please provide any additional information below. Seems like the issue is around cookie === null and cookie !== null checks in read function (line 2017 onwards). JQuery cookie plugin returns undefined value on $.cookie calls, so cookie === null check passes as false. If all of these checks are replaced with "==" and "!=", then dynatree works as expected.
Feb 28, 2013
(No comment was entered for this change.)
Status:
Accepted
Labels: Milestone-Release1.2.5
Mar 3, 2013
This issue was updated by revision r646.
Aug 26, 2013
Issue 451 has been merged into this issue.
Sep 8, 2013
Did the last patch fix it for you?
Status:
Waiting
Oct 6, 2013
Assume fixed
Status:
Fixed
Oct 6, 2013
Assume fixed
Mar 13, 2014
The issue still exists with dynatree 1.2.4 and jquery patched version as well as unpacthed version. For me the solution of editing jquery.dynatree.js at line 2107 and changing === to == seem to solve the problem.. However, the issue persists on IE 10 even after making the above mentioned change.
Mar 13, 2014
have you tried with the recent version of Dynatree (1.2.5) and the latest jquery.cookie.js? (don't forget to clear the browser's cache) What is the exact error on the console?
Mar 14, 2014
Thank you very much for your response.. I really appreciate the hardwork and effort put in by you and your team. Answers to your questions: ------------------------------ No I have not tried the latest version . I am using v1.2.4. Exact error in Error console (After clearing dynatree cookies and operator conversion): ------------------------------- The exact error was: Uncaught TypeError: Cannot call method 'split' of undefined Test with v1.2.5 ---------------- I am going to test with v1.2.5 and will post the results, never new when 1.2.5 came out. Thanks
Mar 15, 2014
The reported issue was not produced with v1.2.5 . Additionally no patched version was needed. v1.2.5 works fine now..!!! Tested and working on Chrome(latest), IE 10 and Firefox(latest) on windows 8.1 x64 Sorry for the late response... Thanks again. |
Btw, the examples in dynatree download seem to use an old version of jQuery Cookie Plugin. The latest cookie plugin has the following code: var result = key ? undefined : {};