Discourse Comments Integration Issues

When I try to use the ghost forum Integration, I get some very odd posts being created.

For example this is the forum post created that goes with this blog post.

Is there a reason why it looks so broken? You can see the relevant code here.

Have i broken something to make the integration look so busted? I’m currently using Ghost 4.4.0 though happy to upgrade is that would fix any observed behavior.

@csgeek I noticed that whereas you have the line

discourseEmbedUrl: '{{url absolute="true"}}'

in my usage I’ve got

discourseEmbedUrl: '{{@site.url}}{{url}}'

Try that?

I mean I can try that, but that would just change the URL wouldn’t it?

I can look at the source and see the discourseEmbedUrl: 'https://www.geekbeacon.org/squirrel-army/butters-corner-the-perspective-of-anxiety/' which is valid.

I’ll poke at this some more tomorrow and see why it’s misbehaving.

Okay yeah, that was lazy of me to think that that was the problem. Anyway, I think I found your issue: switch around the </article> and </div> on lines 75 and 76, you’ve got them in the wrong order (according to what you’ve got at the beginning of the file).

I changed those around but still no go. I’m also curious why the posts have these weird messages.

You’ve successfully subscribed to GeekBeacon

Great! Next, complete checkout for full access to GeekBeacon

Welcome back! You’ve successfully signed in.

Success! Your account is fully activated, you now have access to all content.

Success! Your billing info is updated.

Billing info update failed.

You can see the output after my change here

Yeah, why would that </article> and </div> switch fix things? If anything it’d only affect coding afterwards.

Anyway, I presume the problem might be due to a JS mistake or missing JS. If you look at the source code of the Support Lines - Butter Comics 2020 post you can see coding for all the various notifications. I’m not sure if that should all be there. Either way, it’s not displaying in the browser due to display: none or JS functionality or whatever, however Discourse nonetheless picks it up due to not using the same CSS or JS or whatever it be to display things.

My guess then is that you’ve either changed or removed some JS which is resulting in all those lines of code appearing in the post’s rendered source code, or there’s a bug in the theme. Having taken a look at the source code of a demo post of the Melaka theme (which I see you’re using) I don’t see the errant code. I presume then that you’ve done something that would otherwise be stopping that code from being “injected” into the post (and, in fact, into every single page/post of your site I see).

@csgeek I have the same issue. Could you solve it?

Honestly don’t remember what I ended up changing. This is my current version: https://github.com/OSAlt/gb-www-site/blob/master/content/themes/melaka-custom/post.hbs#L45

I will say that Discourse integration has been pretty cruddy in general. If you have a lot of active users on your forum they’ll get spammed with notifications each time you change the URI or any significant changes it’ll go ahead and repost the page once more as if it’s a new page post.

I also wish there was a way where if my blog post is unpublished the discourse post would also no longer become visible.

It’s convenient since I’m already running a forum but it’s pretty lacking in my view. (Also their community – discourse – is pretty terrible at times )