Last modified: 2006-09-04 18:06:25 UTC
On the new subcategory tree function, instead of displaying "nothing found" when one gets to the final subcategory in a tree, Safari displays "undefined undefined: null" in a large red font. See screenshot at URL above. I don't have a clue how the subcategory tree function works but this looks pretty broken. I know Safari isn't the most popular browser but it seems perhaps indicative that this isn't the ideal way to do whatever it is it is trying to do. (Why doesn't each node figure out if it has children or not when it is displayed and then just not allow you to expand it if it doesn't? Even the "nothing found" looks a little amateurish IMO.)
The reasone that it doesn't count children up fron is simple: it would require a lot of database queries, the reult of which would rarely be used. I'm not aware of any way to do this nice and fast. Why safari displays "undefined" there I don't know... and I don't have safar to test it. I'll ask around.
This appears to be a safari bug - "undefined undefind" refers to the status and statusText fields of the XMLHttpRequest object, which *must* always be available, as per specification. I have found reports about Safari sometimes not setting these fields, but not about this specific case - it seems this is triggered when the response from the server is empty. I'm currently trying to find a workaround - I can't think of a good way right now, though. Does this happen for *all* "terminal" subcategories for you? Always? Does it sometimes happen in other cases as well? Especially, check this: if you expand a category node, then reload the page, then expand the same node again - does that trigger an error? For reference: http://www.bitterpill.org/bp/2005-06/safari-xmlhttprequest-undefine.html describes a problem related to If-Modified-Since caching, with the same symptoms.
I've seen it in all terminal subcategories, even if I do many of them at the same time. I tried the reloading-and-clicking and it does the same thing. Even if I open a node and then close it and open it again. It seems to strike-out in Safari each time. I can see why not to look for children ahead of time; and I imagine keeping a static childcount for any individual category would take some substantial re-working of the way things are currently done.
Relevant Webkit bug: http://bugzilla.opendarwin.org/show_bug.cgi?id=10638
Scrap the above, now filed as a separate issue: http://bugzilla.opendarwin.org/show_bug.cgi?id=10716
I have committed a workaround in r16377. I hope that fixes the problem, I don't have Safari to test.
The workaround is active on wikipedia now, please check if the problem has gone away. You can reopen the bug if it's not OK.