HTTP/1.0 500 Internal Server Error Server: CouchDB/1.1.1 (Erlang OTP/R15B03) Date: Sun, 26 May 2013 03:56:51 GMT Content-Type: text/plain;charset=utf-8 Content-Length: 3488 Cache-Control: must-revalidate {"error":"render_error","reason":"function raised error: (new ReferenceError(\"console is not defined\", \"\", 171)) \nstacktrace: (\"afterResponse\",g)@:171\n(\"afterResponse\",(function (info, req, res) {$(\"#comment_form\").submit(function (ev) {ev.preventDefault();if (!$(\"#add_comment\").hasClass(\"disabled\")) {var form = this;var doc = {type: \"comment\", target: req.query.page, time: datelib.ISODateString(), user: session.userCtx.name, comment: $(\"textarea[name=comment]\", form).val()};if (!doc.comment) {return alert(\"Comment form is empty\");}var appdb = db.use(duality.getDBURL());appdb.saveDoc(doc, function (err) {if (err) {return alert(err);}duality.setURL(\"GET\", \"/_discuss/\" + encodeURIComponent(req.query.page), {});});}return false;});$(\"#clear_comment\").click(function (ev) {$(\"#comment_form textarea[name=comment]\").val(\"\");checkEmpty();});$(\"#comment_form textarea[name=comment]\").keyup(checkEmpty);checkEmpty();session.on(\"change\", checkSession);checkSession(req.userCtx);events.on(\"beforeResource\", function () {session.removeListener(\"change\", checkSession);});exports.scrollToBottom();window.onresize = exports.resizeToWindow;window.onresize();}))@:209\n([object Object],[object Object])@:254\n((function (head, req) {start({code: 200, headers: {'Content-Type': \"text/html\"}});var row, rows = [];while ((row = getRow())) {rows.push(row);}var comments = _.filter(rows, function (r) {return r.doc.type === \"comment\";});var doc_row = _.detect(rows, function (r) {return r.doc.type === \"page\";});var empty_doc = !doc_row;var doc = doc_row ? doc_row.doc : {};comments = _.map(comments, function (c) {c.doc.type = \"comment\";c.doc.pptime = utils.prettyTime(c.doc.time);return c.doc;});if (doc && doc.history) {_.each(doc.history, function (h) {h.type = \"edit\";h.is_edit = true;h.pptime = utils.prettyTime(h.time);comments.push(h);});}comments = _.sortBy(comments, function (c) {return c.time;});var participants = comments.map(function (c) {return c.user;});participants = _.uniq(participants);if (req.query.page && req.query.page[0] === \"_\") {return shows.not_found(null, req);}events.once(\"afterResponse\", discussion_ui.bindDiscussion);return {title: doc.title || utils.idToTitle(req.query.page), content: templates.render(\"discussion.html\", req, {doc: doc, page_title: doc.title || utils.idToTitle(req.query.page), page_subtitle: doc.subtitle, pageid: doc._id || req.query.page, participants: participants, comments: comments, current_tab: \"discussion_page\", logged_in: !!req.userCtx.name, empty_doc: empty_doc})};}),[object Object],[object Object])@:1031\n([object Object],[object Object])@:0\nrunList(function (head, req) {var core = require(\"duality/core\");var fn = require(\"lib/app\").lists.discussion;return core.runList(fn, head, req);},[object Object],[object Array])@/home/ubuntu/hosting/installs/hosting_v1.1.1r3/share/couchdb/server/main.js:956\n(function (head, req) {var core = require(\"duality/core\");var fn = require(\"lib/app\").lists.discussion;return core.runList(fn, head, req);},[object Object],[object Array])@/home/ubuntu/hosting/installs/hosting_v1.1.1r3/share/couchdb/server/main.js:1001\n(\"_design/wiki\",[object Array],[object Array])@/home/ubuntu/hosting/installs/hosting_v1.1.1r3/share/couchdb/server/main.js:1446\n()@/home/ubuntu/hosting/installs/hosting_v1.1.1r3/share/couchdb/server/main.js:1489\n@/home/ubuntu/hosting/installs/hosting_v1.1.1r3/share/couchdb/server/main.js:1500\n@:0\n"}