From: Michael P. <mp...@pl...> - 2008-01-30 13:38:36
|
Noam Weinstein wrote: > The client is using v3.01, but I think the same behavior occurs on the > trunk. I added the debugging code you suggested and it shows that the > KRANG_CONFIG object is null: > > cookie KRANG_PREFS: > {"message_timeout":5,"search_page_size":20,"use_autocomplete":0} > cookie KRANG_CONFIG: null > (then the "config has no properties" error appears) But it isn't always null right? It does get set at least when you log in right? > Looking for the 'Cookies' string in Firebug (shown in an earlier > request, but it doesn't seem to have been overwritten - "set-cookie" > headers were included later, but they only referenced windows, not prefs > or config) There are 2 ways that cookies can get set or deleted. The first is via a Set-Cookie HTTP header and the 2nd is by Javascript setting the document.cookie property. I only see this happening in Krang.Cookie.set(). Is it happening in any auto-generated JS or templates? > Any thoughts? I guess Krang-Config is a cookie that's only used to store > the charset, but when the JSON object is null this causes the JS to > fail, "hanging" the Ajax request (not hanging the browser, but forcing > the user to login again)... Well, we can't just ignore a missing config because we'll then possibly send data in the wrong charset. The only thing I can think of is to find a reproduceable test case from start to finish and then start putting some console.log() statements everywhere you can and see where the CONFIG cookie goes away. -- Michael Peters Developer Plus Three, LP |