nodebb-plugin-blog-comments icon indicating copy to clipboard operation
nodebb-plugin-blog-comments copied to clipboard

Empty comment list in Ghost. Error in ghost.js

Open scaldov opened this issue 6 years ago • 2 comments

Uncaught TypeError: Cannot set property 'onclick' of null at XMLHttpRequest.XHR.onload (ghost.js:110)

var loadMore = document.getElementById('nodebb-load-more'); loadMore.onclick = function() {

There is no such an element nodebb-load-more in post page, allthough it presents in comments.tpl

scaldov avatar Apr 07 '20 05:04 scaldov

Ghost version: 3.12.1 NodeBB v1.13.2. all are up to date

scaldov avatar Apr 07 '20 09:04 scaldov

script ghost.js:164 from post.hbs issues a request: GET https://scyld.org/forum/comments/get/5e8b79166d7538094e0d74a0/0 I can see in the response all comments made, but they are not rendered in page.

The response is:

{ "posts": [ { "content": "<p dir="auto"><img src="/forum/assets/uploads/files/1586199533196-scaldov-av.jpg" alt="scaldov-av.jpg" class="img-responsive img-markdown" />
\nLOL

\n", "pid": 24, "tid": 5, "timestamp": 1586199542832, "toPid": "21", "uid": 1, "deleted": 0, "upvotes": 0, "downvotes": 0, "deleterUid": 0, "edited": 0, "votes": 0, "timestampISO": "2020-04-06T18:59:02.832Z", "editedISO": "", "index": 1, "parent": { "username": "scaldov" }, "user": { "uid": 1, "username": "scaldov", "userslug": "scaldov", "reputation": 0, "postcount": 5, "topiccount": 1, "picture": null, "signature": "", "banned": 0, "banned:expire": 0, "status": "online", "lastonline": 1586263646925, "groupTitle": "["administrators"]", "groupTitleArray": [ "administrators" ], "icon:text": "S", "icon:bgColor": "#009688", "lastonlineISO": "2020-04-07T12:47:26.925Z", "banned_until": 0, "banned_until_readable": "Not Banned", "selectedGroups": [], "custom_profile_info": [] }, "editor": null, "bookmarked": false, "upvoted": false, "downvoted": false, "replies": { "hasMore": false, "users": [], "text": "[[topic:one_reply_to_this_post]]", "count": 0 }, "selfPost": true }, { "content": "<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://scyld.org/forum/uid/1">@scaldov said in <a href="/forum/post/22">Avatar:\n
\n<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://scyld.org/forum/uid/1">@scaldov LoL\n
\n<p dir="auto">Жесть\n", "pid": 23, "tid": 5, "timestamp": 1586198991970, "toPid": "22", "uid": 1, "deleted": 0, "upvotes": 0, "downvotes": 0, "deleterUid": 0, "edited": 0, "votes": 0, "timestampISO": "2020-04-06T18:49:51.970Z", "editedISO": "", "index": 2, "parent": { "username": "scaldov" }, "user": { "uid": 1, "username": "scaldov", "userslug": "scaldov", "reputation": 0, "postcount": 5, "topiccount": 1, "picture": null, "signature": "", "banned": 0, "banned:expire": 0, "status": "online", "lastonline": 1586263646925, "groupTitle": "["administrators"]", "groupTitleArray": [ "administrators" ], "icon:text": "S", "icon:bgColor": "#009688", "lastonlineISO": "2020-04-07T12:47:26.925Z", "banned_until": 0, "banned_until_readable": "Not Banned", "selectedGroups": [], "custom_profile_info": [] }, "editor": null, "bookmarked": false, "upvoted": false, "downvoted": false, "replies": { "hasMore": false, "users": [], "text": "[[topic:one_reply_to_this_post]]", "count": 0 }, "selfPost": true }, { "content": "<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://scyld.org/forum/uid/1">@scaldov LoL\n", "pid": 22, "tid": 5, "timestamp": 1586198930106, "toPid": "21", "uid": 1, "replies": { "hasMore": false, "users": [ { "uid": 1, "username": "scaldov", "userslug": "scaldov", "picture": null, "icon:text": "S", "icon:bgColor": "#009688", "administrator": true } ], "text": "[[topic:one_reply_to_this_post]]", "count": 1, "timestampISO": "2020-04-06T18:49:51.970Z" }, "deleted": 0, "upvotes": 0, "downvotes": 0, "deleterUid": 0, "edited": 0, "votes": 0, "timestampISO": "2020-04-06T18:48:50.106Z", "editedISO": "", "index": 3, "parent": { "username": "scaldov" }, "user": { "uid": 1, "username": "scaldov", "userslug": "scaldov", "reputation": 0, "postcount": 5, "topiccount": 1, "picture": null, "signature": "", "banned": 0, "banned:expire": 0, "status": "online", "lastonline": 1586263646925, "groupTitle": "["administrators"]", "groupTitleArray": [ "administrators" ], "icon:text": "S", "icon:bgColor": "#009688", "lastonlineISO": "2020-04-07T12:47:26.925Z", "banned_until": 0, "banned_until_readable": "Not Banned", "selectedGroups": [], "custom_profile_info": [] }, "editor": null, "bookmarked": false, "upvoted": false, "downvoted": false, "selfPost": true }, { "content": "<p dir="auto">test comment\n", "pid": 21, "tid": 5, "timestamp": 1586198892941, "uid": 1, "replies": { "hasMore": false, "users": [ { "uid": 1, "username": "scaldov", "userslug": "scaldov", "picture": null, "icon:text": "S", "icon:bgColor": "#009688", "administrator": true } ], "text": "[[topic:replies_to_this_post, 2]]", "count": 2, "timestampISO": "2020-04-06T18:48:50.106Z" }, "deleted": 0, "upvotes": 0, "downvotes": 0, "deleterUid": 0, "edited": 0, "votes": 0, "timestampISO": "2020-04-06T18:48:12.941Z", "editedISO": "", "index": 4, "user": { "uid": 1, "username": "scaldov", "userslug": "scaldov", "reputation": 0, "postcount": 5, "topiccount": 1, "picture": null, "signature": "", "banned": 0, "banned:expire": 0, "status": "online", "lastonline": 1586263646925, "groupTitle": "["administrators"]", "groupTitleArray": [ "administrators" ], "icon:text": "S", "icon:bgColor": "#009688", "lastonlineISO": "2020-04-07T12:47:26.925Z", "banned_until": 0, "banned_until_readable": "Not Banned", "selectedGroups": [], "custom_profile_info": [] }, "editor": null, "bookmarked": false, "upvoted": false, "downvoted": false, "selfPost": true } ], "postCount": 5, "user": { "uid": 1, "username": "scaldov", "userslug": "scaldov", "email": "[email protected]", "email:confirmed": 0, "joindate": 1586107026889, "lastonline": 1586263646925, "picture": null, "fullname": null, "location": null, "birthday": null, "website": null, "aboutme": null, "signature": null, "uploadedpicture": null, "profileviews": 0, "reputation": 0, "postcount": 5, "topiccount": 1, "lastposttime": 1586199542832, "banned": 0, "banned:expire": 0, "status": "online", "flags": null, "followerCount": 0, "followingCount": 0, "cover:url": null, "cover:position": null, "groupTitle": "["administrators"]", "groupTitleArray": [ "administrators" ], "icon:text": "S", "icon:bgColor": "#009688", "joindateISO": "2020-04-05T17:17:06.889Z", "lastonlineISO": "2020-04-07T12:47:26.925Z", "banned_until": 0, "banned_until_readable": "Not Banned" }, "template": "\r\n\t\r\n\t\t<div class="topic-profile-pic user">\r\n\t\t\t\r\n\t\t\t<img src="{user.picture}" class="profile-image" />\r\n\t\t\t\r\n\t\t\t<img src="https://1.gravatar.com/avatar/177d180983be7a2c95a4dbe7451abeba?s=95&d=&r=PG" class="profile-image" />\r\n\t\t\t\r\n\t\t\r\n\t\t<form action="{relative_path}/comments/reply" method="post">\r\n\t\t\t<textarea id="nodebb-content" class="form-control" name="content" placeholder="Join the conversation" rows="3">\r\n\t\t\r\n\t\t\tSigned in as {user.username}. <strong id="nodebb-error">\r\n\t\t\t<button class="btn btn-primary">Post a Reply\r\n\t\t\t<input type="hidden" name="_csrf" value="{token}" />\r\n\t\t\t<input type="hidden" name="tid" value="{tid}" />\r\n\t\t\t<input type="hidden" name="url" value="{redirect_url}" />\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t<button class="btn btn-primary" id="nodebb-register">Register\r\n\t\t<button class="btn btn-primary" id="nodebb-login">Login\r\n\t\t
\r\n\t\t\r\n\t\r\n\r\n\t<ul id="nodebb-comments-list">\r\n\t\t\r\n\t\t<li class="nodebb-post-fadein" class="nodebb-post-fadein" >\r\n\t\t\t<div class="topic-item">\r\n\t\t\t\t<div class="topic-body">\r\n\t\t\t\t\t<div class="topic-profile-pic">\r\n\t\t\t\t\t\t<a href="{relative_path}/user/{user.userslug}">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<img src="{user.picture}" alt="{user.username}" class="profile-image" title="{user.username}">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<div class="profile-image" style="background-color: {user.icon:bgColor}" title="{user.username}" alt="{user.username}">{user.icon:text}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class="topic-text">\r\n\t\t\t\t\t\t<div class="post-content" itemprop="text">{user.username} commented {posts.timestamp}
{posts.content}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t
\r\n\r\n\t\r\n\t\t<div class="topic-profile-pic user">\r\n\t\t\t\r\n\t\t\t<img src="{user.picture}" class="profile-image" />\r\n\t\t\t\r\n\t\t\t<img src="http://1.gravatar.com/avatar/177d180983be7a2c95a4dbe7451abeba?s=95&d=&r=PG" class="profile-image" />\r\n\t\t\t\r\n\t\t\r\n\t\t<form action="{relative_path}/comments/reply" method="post">\r\n\t\t\t<textarea id="nodebb-content" class="form-control" name="content" placeholder="Join the conversation" rows="3">\r\n\t\t\r\n\t\t\tSigned in as {user.username}. <strong id="nodebb-error">\r\n\t\t\t<button class="btn btn-primary">Post a Reply\r\n\t\t\t<input type="hidden" name="_csrf" value="{token}" />\r\n\t\t\t<input type="hidden" name="tid" value="{tid}" />\r\n\t\t\t<input type="hidden" name="url" value="{redirect_url}" />\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t<button class="btn btn-primary" id="nodebb-register">Register\r\n\t\t<button class="btn btn-primary" id="nodebb-login">Login\r\n\t\t
\r\n\t\t\r\n\t\r\n\r\n\t<small class="nodebb-copyright">Powered by <a href="http://nodebb.org" target="_blank">NodeBB • <a href="{relative_path}/topic/{tid}">View original thread\r\n\t<button class="btn btn-primary" style="display: none" id="nodebb-load-more">Load more comments...\r\n\r\n\tCommenting has been disabled.\r\n\t\r\n\t<form action="{relative_path}/comments/publish" method="post">\r\n\t\t<button class="btn btn-primary">Publish this article to NodeBB\r\n\t\t<input type="hidden" name="markdown" id="nodebb-content-markdown" />\r\n\t\t<input type="hidden" name="title" id="nodebb-content-title" />\r\n\t\t<input type="hidden" name="cid" id="nodebb-content-cid" />\r\n\t\t<input type="hidden" name="tags" id="nodebb-content-tags" />\r\n\t\t<input type="hidden" name="id" value="{article_id}" />\r\n\t\t<input type="hidden" name="url" value="{redirect_url}" />\r\n\t\t<input type="hidden" name="_csrf" value="{token}" />\r\n\t\r\n\t\r\n\r\n", "token": "wGPBkTZl-N4SNx7kRqr1P24ttzecB85y9m-w", "isAdmin": true, "isLoggedIn": true, "tid": 5, "category": { "bgColor": "#e95c5a", "cid": 4, "class": "col-md-3 col-xs-6", "color": "#fff", "description": "Got a question? Ask away!", "descriptionParsed": "

Got a question? Ask away!

\n", "disabled": 0, "icon": "fa-question", "imageClass": "cover", "isSection": 0, "link": "", "name": "Comments & Feedback", "numRecentReplies": 1, "order": 3, "parentCid": 0, "post_count": 5, "slug": "4/comments-feedback", "topic_count": 1, "totalPostCount": 5, "totalTopicCount": 1 }, "atBottom": false, "atTop": true }

scaldov avatar Apr 07 '20 13:04 scaldov