[nodebb-plugin-blog-comments] Blog Commenting Engine (Ghost, Wordpress widget)
-
I have updated my nginx config to match the documentation and my nginx config looks like this:
server { listen 80; server_name z0z0.tk www.z0z0.tk; return 301 $scheme://z0z0.me$request_uri; } server { listen 80; server_name z0z0.me; #charset koi8-r; access_log /var/log/nginx/z0z0/access.log main; error_log /var/log/nginx/z0z0/error_log; location / { # add_header 'Acess-Control-Allow-Origin' 'http://z0z0.me'; # add_header 'Access-Control-Allow-Credentials' 'true'; # add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; # add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type, DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With'; proxy_set_header X-Real-IP $remote_addr; proxy_set_header HOST $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:2369; proxy_redirect off; } location /comments { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Nginx-Proxy true; proxy_pass http://127.0.0.1:4567; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
And it still not working. I am getting the same error.
-
@Peter-Zoltan-Keresztes I have updated the proxy_pas config to http://127.0.0.1:4567/comments or /comments/ no change. No matter what I do I am getting the same warning message for most of the blog posts while for some of them is working fine.
-
Any other suggestion which might help me make this plugin fully work?
-
@Peter-Zoltan-Keresztes
I don't know, I have another problem with this plugin:one of topics will be purge from my forum and now I can't publish it again!!!
-
Is there any way I can debug the plugin to see what is the exact url which is getting or what is the response?
-
It seam to me that it cannot read the origin url for some reason.
-
Anyone any suggestion? I would assume no one is using it with Ghost.
-
I have upgraded the node to the latest version of version4 but that did not helped at all.
-
@Peter-Zoltan-Keresztes I do and it works just fine.
-
@AOKP Interesting, but I don't understand why I am having these issues.
-
@Peter-Zoltan-Keresztes maybe share your config.json and also the settings you use for the plugin in the ACP.
-
@AOKP Here is my config.json:
{ "url": "http://z0z0.me/comments", "secret": "somehash", "database": "redis", "redis": { "host": "127.0.0.1", "port": "6379", "password": "somepass", "database": "0" } }
and here is the plugin setting in the ACP:
-
@Peter-Zoltan-Keresztes and how did the code looked you embed into your Ghost installation?
I assume that maybe you are facing a theming issue here. But we will see.
-
@AOKP I am using the default Casper theme and I just copied the code from this post and implemented in the post.hbs right before the {{/post}} tag.
</aside> <a id="nodebb/comments"></a> <script type="text/javascript"> var nbb = {}; nbb.url = '//z0z0.me/comments'; // EDIT THIS (function() { nbb.articleID = '{{../post.id}}'; nbb.title = '{{../post.title}}'; nbb.tags = [{{#../post.tags}}"{{name}}",{{/../post.tags}}]; nbb.script = document.createElement('script'); nbb.script.type = 'text/javascript'; nbb.script.async = true; nbb.script.src = nbb.url + '/plugins/nodebb-plugin-blog-comments/lib/ghost.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb.script); })(); </script> <script id="nbb-markdown" type="text/markdown">{{{../post.markdown}}}</script> <noscript>Please enable JavaScript to view comments</noscript> {{/post}}
-
@Peter-Zoltan-Keresztes try to insert it right after the share section.
-
@AOKP said:
@Peter-Zoltan-Keresztes try to insert it right after the share section.
reply
After a sleepless night where I have reinstalled everything. New VPS, new blog, new nodebb and I am back at square 1 where out of 15 posts only on 3 I was able to enable the comments. On rest I am getting in the logs the 31/12 08:10 [6749] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me. It seam to me that nodebb cannot read the Origin header from most of the blog posts.
-
@Peter-Zoltan-Keresztes had the same in my logs though and it worked as I showed you yesterday.
-
Not sure what can I do. Right now I am using your exact same configs for node and ghost in nginx.
-
This post is deleted!
-
The latest updates fixed all the issues I had on enabling comments on most of the ghost blog posts.