Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    NodeBB Blog Comments Plugin Ghost.js Not Found

    NodeBB
    2
    3
    101
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • brianb
      brianb last edited by brianb

      I've been trying to get the nodebb blog comments plugin working.

      I just installed cloudron on a new linode a few days ago. I installed nodebb and ghost via cloudron with no issues. they both work great!

      I tried to find and install the blog comments plugin on nodebb admin but it is not there. So I did so manually via opening a terminal from nodebb cloudron admin.

      I followed the example in the cloudron docs for installing a plugin manually and it seemed to have worked. In the logs for nodebb install it says

      warn: [deprecation] The `/plugins` shorthand prefix is deprecated, prefix with `/assets/plugins` instead (path: /nodebb-plugin-blog-comments/lib/ghost.js)

      This gave me a clue to the first issue. The ghost.js file could not be loaded in Ghost post page.

      So I tried to test the ghost.js url by combining and pasting the complete url for the ghost.js that it was returning 404 / not found.

      I think it will all work once I get the ghost.js script to load and render to the ghost post page.

      I used find to locate the file find / -name "ghost.js"

      it returned /run/nodebb/node_modules/nodebb-plugin-blog-comments/public/lib/ghost.js

      so it all "looks right" to me so I must be missing something obvious. I would appreciate any help so I can get NodeBB handling the comments for my Ghost blog.

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @brianb last edited by

        @briankb-0 Did you restart the forum after installing the plugin. I haven't tried to use the plugin itself but I am not seeing this warning after installing the plugin:

         => Starting nodebb
        
         NodeBB v2.0.0 Copyright (C) 2013-2022 NodeBB Inc.
         This program comes with ABSOLUTELY NO WARRANTY.
         This is free software, and you are welcome to redistribute it under certain conditions.
         For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
        
         Clustering enabled: Spinning up 1 process(es).
        
         2022-05-09T21:28:35.761Z [4567/74] - info: Initializing NodeBB v2.0.0 https://forum.cloudron.space
         2022-05-09T21:28:37.523Z [4567/74] - info: [socket.io] Restricting access to origin: https://forum.cloudron.space:*
        
         2022-05-09T21:28:37.750Z [4567/74] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
         * nodebb-plugin-mentions
         * nodebb-rewards-essentials
         * nodebb-plugin-blog-comments
        
         2022-05-09T21:28:37.841Z [4567/74] - info: [api] Adding 0 route(s) to `api/v3/plugins`
         2022-05-09T21:28:37.878Z [4567/74] - info: [router] Routes added
         2022-05-09T21:28:37.891Z [4567/74] - info: NodeBB Ready
         2022-05-09T21:28:37.893Z [4567/74] - info: Enabling 'trust proxy'
         2022-05-09T21:28:37.895Z [4567/74] - info: NodeBB is now listening on: 0.0.0.0:4567
         2022-05-09T21:28:37.895Z [4567/74] - info: Canonical URL: https://forum.cloudron.space
        

        It does say that it's incompatible though. For that, you have to report the bug upstream https://github.com/psychobunny/nodebb-plugin-blog-comments

        1 Reply Last reply Reply Quote 1
        • girish
          girish Staff last edited by

          And doing a curl does return the ghost.js file:

          $ curl -L https://forum.cloudron.space/plugins/nodebb-plugin-blog-comments/lib/ghost.js
          (function() {
          	"use strict";
          
          	var articlePath = window.location.protocol + '//' + window.location.host + window.location.pathname;
          
          	var pluginURL = nbb.url + '/plugins/nodebb-plugin-blog-comments',
          		savedText, nodebbDiv, contentDiv, commentsDiv, commentsCounter, commentsAuthor, commentsCategory;
          
          	var stylesheet = document.createElement("link");
          	stylesheet.setAttribute("rel", "stylesheet");
          	stylesheet.setAttribute("type", "text/css");
          	stylesheet.setAttribute("href", pluginURL + '/css/comments.css');
          
          ...
          

          The version of the plugin installed is 0.8.6

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Powered by NodeBB