My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 405: TypeError in cookie read
3 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Oct 2013


 
Reported by roslov.a...@gmail.com, Feb 28, 2013
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
#1 roslov.a...@gmail.com
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 : {};
Feb 28, 2013
Project Member #2 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Accepted
Labels: Milestone-Release1.2.5
Mar 3, 2013
Project Member #3 moo...@wwwendt.de
This issue was updated by revision r646.
Aug 26, 2013
Project Member #4 moo...@wwwendt.de
 Issue 451  has been merged into this issue.
Sep 8, 2013
Project Member #5 moo...@wwwendt.de
Did the last patch fix it for you?
Status: Waiting
Oct 6, 2013
Project Member #6 moo...@wwwendt.de
Assume fixed
Status: Fixed
Oct 6, 2013
Project Member #7 moo...@wwwendt.de
Assume fixed
Mar 13, 2014
#8 timematc...@gmail.com
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
Project Member #9 moo...@wwwendt.de
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
#10 timematc...@gmail.com
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
#11 timematc...@gmail.com
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.

Powered by Google Project Hosting