Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicating Ghost Post Content After Comments #59

Open
dbalders opened this issue Sep 2, 2016 · 1 comment
Open

Duplicating Ghost Post Content After Comments #59

dbalders opened this issue Sep 2, 2016 · 1 comment

Comments

@dbalders
Copy link

dbalders commented Sep 2, 2016

There seems to be an issue with the latest Ghost where the nodebb comments are replicating the content after where they are inserted. For example, here is an image of the post with nodebb comments removed:

no-nodebb

And here is the same post with nodebb inside the post:

yes-nodebb

The code I am commenting in and out is this:

<a id="nodebb-comments"></a>
<script type="text/javascript">
        var nbb = {};
        nbb.url = 'myurl';

       (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>

So there seems to be something weird with the nodebb insert also inserting part of the post.

@dbalders
Copy link
Author

Seems to happen after any <script></script> is added inside the post itself. Any content after that gets duplicated after the comments are embedded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant