jannbmsy / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

TypeError in cookie read #405

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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. 

Original issue reported on code.google.com by roslov.a...@gmail.com on 1 Mar 2013 at 5:36

GoogleCodeExporter commented 8 years ago
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 : {};

Original comment by roslov.a...@gmail.com on 1 Mar 2013 at 5:46

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 1 Mar 2013 at 6:57

GoogleCodeExporter commented 8 years ago
This issue was updated by revision r646.

Original comment by moo...@wwwendt.de on 3 Mar 2013 at 5:59

GoogleCodeExporter commented 8 years ago
Issue 451 has been merged into this issue.

Original comment by moo...@wwwendt.de on 27 Aug 2013 at 5:58

GoogleCodeExporter commented 8 years ago
Did the last patch fix it for you?

Original comment by moo...@wwwendt.de on 8 Sep 2013 at 7:22

GoogleCodeExporter commented 8 years ago
Assume fixed

Original comment by moo...@wwwendt.de on 6 Oct 2013 at 2:03

GoogleCodeExporter commented 8 years ago
Assume fixed

Original comment by moo...@wwwendt.de on 6 Oct 2013 at 2:03

GoogleCodeExporter commented 8 years ago
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.

Original comment by timematc...@gmail.com on 13 Mar 2014 at 10:21

GoogleCodeExporter commented 8 years ago
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?

Original comment by moo...@wwwendt.de on 14 Mar 2014 at 6:47

GoogleCodeExporter commented 8 years ago
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

Original comment by timematc...@gmail.com on 14 Mar 2014 at 1:13

GoogleCodeExporter commented 8 years ago
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.

Original comment by timematc...@gmail.com on 15 Mar 2014 at 3:01