[nodebb-plugin-blog-comments] Blog Commenting Engine (Ghost, Wordpress widget)
-
@julian yes, the page works. Previously created blog articles with comments are being displayed. As an example, if you look at https://content.sudonix.com and review any articles apart from the latest (about gradients and colors - this is the only one that doesn't work) you'll see what I mean.
-
@baris response seems to be
NULL
Also, I attempted to perform a complete reset
db.objects.deleteMany({ _key: "blog-comments" });
Which resulted in
{ "acknowledged" : true, "deletedCount" : 0 }
Something doesn't look right here. I'd expect the delete statement to be more than 0 ? The existing blog post comments are also still intact.
-
@baris Sorry. My fault. I forgot to select the NodeBB database
See below
db.objects.findOne({_key: "blog-comments"}); { "_id" : ObjectId("619b94d1bd1e82aef790fb9e"), "_key" : "blog-comments", "61768dda84686c09dddd1ef2" : 132, "6176a31a84686c09dddd1f0d" : 133, "6179569c84686c09dddd1fa7" : 134, "6176d2ca84686c09dddd1f95" : 135, "6176d21884686c09dddd1f88" : 136, "6176c0f684686c09dddd1f73" : 137, "6176bd7e84686c09dddd1f59" : 138, "6176b78f84686c09dddd1f22" : 139, "61768e6f84686c09dddd1efa" : 140, "61768ad984686c09dddd1eea" : 141, "617689a484686c09dddd1ebf" : 142, "6176893584686c09dddd1eb6" : 143, "6176873384686c09dddd1eae" : 144, "61a8ac37c2aaf679e63d3336" : 152, "61a8add7c2aaf679e63d3346" : 153, "61a8b08ac2aaf679e63d335d" : 154, "61a8b14fc2aaf679e63d336b" : 155, "61a8b842c2aaf679e63d337b" : 156, "61a8cd79c2aaf679e63d338e" : 157, "61a8d13ac2aaf679e63d339d" : 158, "61a8d1bec2aaf679e63d33ac" : 159, "61a8d29bc2aaf679e63d33c6" : 160, "61a8d318c2aaf679e63d33da" : 161, "61b35c493606679963e1d2fb" : 167, "61b38b413606679963e1d30b" : 168, "61b3a0e93606679963e1d38c" : 169, "61b3a1fe3606679963e1d3a0" : 170, "61b3a40d3606679963e1d3b0" : 171 }
-
So the blog comment with the error has the id
6219049e2afd527be4dcf698
and it isn't in theblog-comments
mapping. Which means the link between the blog post and topic id is broken. If you get the topic id for that blog post and add it manually toblog-comments
it should be fixed. -
@baris said in [nodebb-plugin-blog-comments] Blog Commenting Engine (Ghost, Wordpress widget):
So the blog comment with the error has the id 6219049e2afd527be4dcf698 and it isn't in the blog-comments mapping. Which means the link between the blog post and topic id is broken. If you get the topic id for that blog post and add it manually to blog-comments it should be fixed.
Actually, let's step back a bit here. It's "broken" because I was unable to establish the link in the first place. I created a new blog post just now, and that behaves the same way. So it's not "missing" - it was never there in the first place!
-
When you publish a blog post there should be a button to publish it to the forum AFAIK. This code should execute https://github.com/psychobunny/nodebb-plugin-blog-comments/blob/master/library.js#L159-L171 and create a topic in nodebb and link the blog post to the nodebb topic. You can put some console.logs in that function to see if it gets executed. If the new blog post is missing from
blog-comments
object it is likely the blog post wasn't published to nodebb or there was an error when publishing it. -
@baris said in [nodebb-plugin-blog-comments] Blog Commenting Engine (Ghost, Wordpress widget):
When you publish a blog post there should be a button to publish it to the forum AFAIK.
The issue here is that there is absolutely nothing. It's blank. If you inspect the HTML, you can clearly see the DIV, but it's contents are empty despite the JS being also included. So, the upshot here is that it's not possible to even post ! Below is an example
You'll see the DIV is there, but there, but you can't do anything
Now compare this to one that does work without issue...
-
Ok, so after reading up a bit, I took the plunge and created the key association using the below steps
- Created a new post in NodeBB, and then recorded the ID (in this case, 244)
- Logged into MongoDB and ran the below update statement
db.objects.update({"_id" :ObjectId("619b94d1bd1e82aef790fb9e") },{$set : {"6219049e2afd527be4dcf698":244}});
- This created the association between the blog post, and the NodeBB post, and now it seems to work as intended, although creating the post manually seems to add a phantom comment which doesn't actually exist
There is clearly an issue with this plugin. It works, but only if you actually create the association manually in the database, which of course isn't optimum. In my testing, this plugin seems to think the association already exists so doesn't ask you to create the link, which leads to having to complete the steps above.
In this case, I'm using
Nodebb 1.19.3
andGhost version: 4.34.3
-
@phenomlab does the ghost script get loaded from your NodeBB site?