Conditions: site has chatroom module installed, but not all pages have chatroom field type.
Symptoms: all pages which lack the chatroom field throw the following script error on loading:
Uncaught TypeError: Cannot read property 'connectionSetupHandlers' of undefined chatroom.js:78
Proximal cause: chatroom.js is loaded on all pages regardless of the presence of the field type.
Root cause: chatroom.js assumes that there will be a chatroom field present.
Proposed fix: comment out line 362 in chatroom.module to prevent the script being loaded on all pages.
This has been tested and does not affect the operation of the chatroom, since there is a call to chatroom_add_js() in the field formatter function.