psychobunny / nodebb-plugin-blog-comments

Lets NodeBB act as a comments engine/widget for your blog
BSD 2-Clause "Simplified" License
100 stars 55 forks source link

Unexpected end of JSON input #77

Closed GraemeFulton closed 5 years ago

GraemeFulton commented 6 years ago

I'm getting this, and can't figure out why. I'm using the WordPress version, and the JSON API is active. Any ideas what could fix this?

'2018-11-06T11:10:08.237Z [17194] - error: /comments/publish SyntaxError: Unexpected end of JSON input at Object.parse (native) at Comments.publishArticle (/var/www/html/prototypr-forums/forums/node_modules/nodebb-plugin-blog-comments/library.js:135:15) at Layer.handle [as handle_request] (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/layer.js:95:5) at next (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/layer.js:95:5) at /var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:335:12) at next (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:275:10) at Function.handle (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:174:3) at router (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:47:12) at Layer.handle [as handle_request] (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:317:13) at /var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:335:12) at next (/var/www/html/prototypr-forums/forums/node_modules/express/lib/router/index.js:275:10)'

GraemeFulton commented 6 years ago

aha, I followed the error and checked the network tab to see empty values in the title, cid and others - it was because my json api call is not working