Issues with Raptive Ads

I have a head-scratcher that I can’t seem to figure out. From what I see, post id’s are not always syncing across to our Discourse site (forum.pistolsfiringblog.com) from the Wordpress site (pistolsfiringblog.com) causing comments to fail loading on the Wordpress posts along with the option to comment (we do not allow WP comments, only Discourse).

A good example is the following post:
WP: Coleman Scott Joins Oklahoma State Wrestling Staff as Associate Head Coach - Pistols Firing
Discourse: Coleman Scott Joins Oklahoma State Wrestling Staff as Associate Head Coach - #4 by MiggityMac - PFB Articles - The Chamber

Even though comments are allowed on the post, the post_id is coming across undefined. I did a little diving into the Discourse Wordpress plugin and it just returns when id is undefined. That’s fine and to be expected. Nothing stood out. However, other posts on the site display comments while others do not. The settings are the exact same as the no-show posts (I’ve intently compared).

If I try to force the id into the webhook call https://pistolsfiringblog.com/wp-json/wp-discourse/v1/discourse-comments?post_id=259952 I get:
"\t\t<div class=\"respond comment-respond\">\n\t\t\t<div class=\"comment-reply-title discourse-no-connection-notice\">\n\t\t\t\t<p>Comments are not currently available for this post.<\/p>\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t"

…Which is completely not true. They are available and they are allowed. For whatever reason beyond me, I can not see my certain posts are not getting a post id to link/relate to the corresponding discourse post so that comments can flow across to WP.

To complicate things, I did a test post as one of our editors would do and watched the entire process from WP post to Discourse and back to WP even with additional comments from Discourse. They all sync’d back to WP on my test post.

I’ve attached screenshots of the main issue (not limited to just one post). Any help is highly appreciated. At this point, I am at a complete loss. ¯\_(ツ)_/¯


2 Likes

Hi @MiggityMac, I’m having a look at your site and I notice a lot of console errors that appear to be related to google ads. Something crashed my browser there too on the Wordpress page. Also seeing content policy and permission errors on the Forum side of the embedded commenting even when the comment button is functional and you can go to the comments. I’m not sure at this point, but it’s possible some of the ad related errors are causing issues that are conflicting with the plugin. I’d review the content security policy settings because that can cause embedding issues. I run the Wordpress plugin on our forum and the few times we’ve had issues with embeds or the button appearing on the Wordpress page, it’s been the content security policy settings. On pages where the comment button works, I still see errors on both sides (Wordpress and Discourse) . I’ll continue to have a look and do some digging…

This is in Discourse on one of the ones that worked

5 Likes

@MiggityMac have you had a look at the WordPress logs?

5 Likes

@MiggityMac This is where I’d start. Lily’s CSP suggestion is also a good one. Also, if possible, could you share the wp meta fields saved in the WP database for that example post?

3 Likes

Thank you much, @Lilly - I wasn’t able to dive deep into yesterday, but today/tomorrow I will be. This is very helpful. I’m going to get into the logs soon and see what’s happening there.

2 Likes

Did the Wordpress plugin start embedding at some point? Last I checked it was syncing copies of comments and displaying them locally.

1 Like

Here are the most recent WP Discourse logs:
pistols-firing-wp-discourse-logs-2022-06-01-2023-08-23.zip (159.7 KB)

Apologies @Stephen you are correct and I am just getting some terminology mixed up. I do know how the plugin works.

I’m curious about what’s going on with this, so figured I should have a look.

There are lots of 429 (too many requests) errors in your logs. Those errors are being called when WordPress attempts to pull a post’s comments from Discourse. I’m not finding errors related to the post you’ve linked to, but possibly the error logs are getting flooded and some errors are skipped.

Here’s a Discourse topic and WordPress post that I’m finding errors for:

The easiest way to start debugging the issue would be for you to go to that post’s edit page on WordPress and enable the “custom fields” panel:

That should display some fields that look like this:

I suspect there will also be a ‘wpdc_sync_post_comments’ field with its value set to 1. If for some reason it’s stuck at 1, that would explain all the ‘too many requests’ errors.

Also, on the WordPress plugin’s Commenting settings tab, what’s the value of the “Enable Discourse Comments” setting?

Has getting Discourse comments to display on your WordPress site ever worked for you? If so, can you think of anything that might have been changed on the WordPress site when comments stopped displaying?

1 Like

Thanks for this great info.
Discourse Comments used to work fine until we had a problem with Raptive (ad thrive updates).
The Discourse commenting settings are the same that you’ve screenshoted.

I enabled the custom fields are on a post. I don’t see any of the fields on a different post, but I do see the on the post in refernce. The wpdc_sync_post_comments was set to zero.


I’ll get the meta on a ‘broken’ post this morning.

2 Likes

@simon - here’s the post meta of a broken post (found here: Arizona State Reportedly Names True Freshman Jaden Rashada as Starting Quarterback – Pistols Firing)

AND the Post Data (split shots):


And some errors in the DC logs (but that is from me updating it previously):

[2023-08-24 19:50:18] publish.ERROR: create_post.post_error {"wp_title":"Arizona State Reportedly Names True Freshman Jaden Rashada as Starting Quarterback","wp_author_id":"20980","wp_post_id":260073,"response_message":"Embed url has already been taken","http_code":422}```

Does this help?

I’m going to look at all of this more closely later on. Hopefully today.

[2023-08-24 19:50:18] publish.ERROR: create_post.post_error {"wp_title":"Arizona State Reportedly Names True Freshman Jaden Rashada as Starting Quarterback","wp_author_id":"20980","wp_post_id":260073,"response_message":"Embed url has already been taken","http_code":422}```

The Embed url has already been taken error should be handled by the WP Discourse plugin. The error is caused when there’s an existing topic on your Discourse site that is already associated with the URL of the WordPress post. The easiest way to trigger the error is to publish a post to Discourse, then click the “Unlink From Discourse” button on WordPress, then try republishing the post to Discourse. The result should look like this:

What the UI is trying to indicate is that instead of publishing the post to Discourse, you need to enter the URL of its associated Discourse topic into the “Topic URL” input. The error message that’s displayed could be improved though.

I’m not sure this accounts for all the issues with Discourse comments on your WordPress site. For example, here’s the topic and post that you supplied the custom field details for:

Those custom fields have the data I’d expect to see if comments were successfully displayed, but I’m not even seeing the Discourse comment template displayed on the WordPress page. I’m guessing something in your theme is preventing it from loading.

Can you confirm that the “Display comments for all topics” option is selected here, and not the “Display a link to the comments” option? I’m just asking in case that’s related to the missing comments template.

Also, it looks like you have the “Load Comments with Ajax” option enabled. I’m seeing a call to that script in the post’s source code. Try disabling that option until this gets sorted out, then re-enable it to see if that causes issues.

2 Likes

Hey Michael, could you explain what the problem you had with Raptive was? And do you still have it enabled on your site?

1 Like

@angus - I wish I could explain more, but the ads just stopped working one day a couple weeks ago - probably due to an plugin auto-update. I wish I had better introspection into but the logs aren’t there. We worked with Raptive to get them back up and running, which they seems to be doing fine. The biggest finding from Raptive was that I needed to basically turn off CORs on our forum and our blog. After that, they began to work again.

We use Cloudflare as a CDN provider for the blog (WP). It is also running on OpenLiteSpeed server but is not using the OLS CDN (using cloudflare). Caches are busted on any updates/posts/plugin updates.

The code that I am using for the Raptive ads are the following:

    if ( function_exists('is_subscribed_to_memberful_plan') && is_subscribed_to_memberful_plan( array('98342-fallcamp2023', '21436-gray-monthly', '21300-white-monthly', '34796-pfb-yearly', '34795-pfb-monthly', '69495-pfb-2021') ) ) {
        ?>
        <script>
            adthrive.cmd.push(function() {
                adthrive.disableAds();
            });
            jQuery('body').addClass('logged-in-no-ads');
        </script>
        <?php
    }
}
add_action('wp_footer', 'enqueue_custom_footer_script');

I know it might be a lot, but here is some aged CSS on that we’re using on the child-theme to do some style adjustments. I’m working on cleaning it up:

/*div#mvp-main-nav-top {
    display: none;
}
*/
/*.mvp-nav-bot-right-out {
    width: 100% !important;
}*/

.mvp-nav-bot-right.left.relative {
  float: none !important;
}
.mvp-nav-bot-right-in {
    margin-right: 88px;
}
#mvp-main-nav-bot-cont {
  background: #1a1a1a !important;
}
li#menu-item-207620 {
    top: -4px;
}
/*.menu-image-title-hide {
    margin-top: -19px !important;
    margin-bottom: -12px !important;
}*/
ul#menu-new-global-menu li:first-child a :not(.sub-menu) {
    margin-bottom: -16px !important;
    margin-top: 0px !important;
}
/*** To keep the Elite Media... from messing up the page top padding ****/
.adthrive-footer-message {
    margin-bottom: 0px !important;
    padding-bottom: 16px;
    background: black;
}
.adthrive-comscore.adthrive-footer-message {
  margin-top: 0px !important;
}
/*AVATAR*/
.account-link img {
    width: 35px !important;
    height: 35px !important;
    border: 2px solid #ddd !important;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    border-radius: 50%;
}
.account-link a {
  padding: 0px 0px 5px 0px !important;
  top: 6px !important;
  height: 39px !important;
}
.account-link {
  margin-left: 16px !important;
  top: -11px;
}
.account-link:hover {
    top: -6px;
}
/*li#menu-item-208021:hover {
    top: -5px;
}*/

.mvp-nav-the-chamber-link {
  content: url("https://pistolsfiringblog.com/wp-content/uploads/2020/01/Chamber-e1580357588365.png");
  cursor: pointer;
  max-width: 38px;
  max-height: 38px;
  float: right;
  margin-top: 7px;
  margin-right: 8px
}

.mvp-nav-menu ul:first-child {
    display: inline-block;
    position: relative;
    padding-left: 8px !important;
    float: left !important;
}

.mvp-nav-menu ul li a {
    font-size: large;
}
.sub-menu li {
  margin-left: 0px !important;
  padding-left: 0px !important;

}
.nav-menu-logo-link {
  pointer-events: none;
  cursor: pointer;
  padding: 0;
  margin-top: 0px !important;
  padding-right: 16px;
}

.nav-menu-logo-link a {
  padding-top: 15px !important;
}

a.menu-image-title-hide.menu-image-not-hovered.external {
    padding: 0;
    /* float: left; */
}
.menu-item a img, img.menu-image-title-after, img.menu-image-title-before, img.menu-image-title-above, img.menu-image-title-below, .menu-image-hover-wrapper .menu-image-title-above {
    border: none;
    box-shadow: none;
    vertical-align: super;
    width: 175px;
    display: inline;
}

.mvp-nav-bot-right {
  width: 50px;
  height: 50px;
  display: inline-flex;
  /*right: 79px;*/
}
.mvp-nav-search-but {
  float: left;
}
span.mvp-nav-search-but {
  cursor: pointer;
  float: left;
  font-size: 20px;
  line-height: 1;
  padding: 15px 15px;

}

.mvp-nav-menu ul li a, #mvp-nav-bot-wrap span.mvp-nav-search-but {
    color: white !important;
}

#mvp-nav-bot-wrap .mvp-fly-but-wrap span, #mvp-nav-bot-wrap .mvp-search-but-wrap span {
    background: white;
    font-size: initial;
}


.textwidget {
   margin-bottom: 5px;
   background: #ff6600;
   padding: 10px;
   font-size: 19px;
   margin-top: 25px;
}

#mvp-post-content {
    width: 100%;
    max-width: 1200px;
}

.textwidget a, a:visited {
   text-decoration: underline;
}

.mvp-flex-story-text p {
    color: #555;
    float: left;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.4;
    margin-top: 10px;
    width: 100%;
}

#mvp-home-widget-wrap .mvp-flex-row .mvp-flex-story-text h2 {

    color: #333333;
    float: left;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
    width: 100%;

}

.mvp-main-box {
    margin: 0 auto;
    width: 1200px;
    height: 100%;
}

.mvp-widget-ad img {
  width: 100%;
  max-width: 1200px;
}

#mvp-post-content {
    width: 100%;
    max-width: 1200px;
}

p a.external, #mvp-content-main p a, .mvp-post-add-main p a {
  color: #ff6600 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

#mvp-content-main a:visited {
  color: #ff6600 !important;
}

h1.mvp-post-title {
  font-size: 30px !important;
}

#mvp-content-main ul {
  font-family: 'PT Serif', sans-serif !important;
}

#mvp-content-main p a:hover, .mvp-post-add-main p a:hover {
  text-decoration: underline !important;
  background: none !important;
}

.mvp-feat5-mid-main-text h2 {
  color:#222222;
  float:left;
  font-size:1.4rem;
  font-weight:700;
  letter-spacing:-0.02em;
  line-height:1.2;
  width:100%;
}

.mvp-feat5-small-main-text h2 {
  color:#222222;
  float:left;
  font-size:1.3rem;
  font-weight:700;
  letter-spacing:-0.02em;
  line-height:1.2;
  width:100%;
}

.mvp-feat5-mid-sub-text h2 {
  color:#222222;
  float:left;
  font-size:1.2rem;
  font-weight:700;
  letter-spacing:-0.02em;
  line-height:1.2;
  width:100%;
}

.mvp-blog-story-text h2 {
  color:#222222;
  float:left;
  font-size:1.4rem;
  font-weight:700;
  letter-spacing:-0.02em;
  line-height:1.1;
  width:100%;
}

#mvp-home-widget-wrap .mvp-flex-col .mvp-flex-story-text h2 {
  font-size:1.4rem;
}

span.mvp-feat1-pop-head {
  font-family: 'Oswald', sans-serif;
  }

/* Copied from old Pistols Firing Site */

blockquote {
/*  border-left-color: #232323 !important;
  border-left-style: solid !important;
  border-left-width: 6px !important;*/
  font-family: inherit !important;
  font-style: italic !important;
  font-weight: 400 !important;
  margin: 0 0 0 15px !important;
  padding-left: 3px !important;
  line-height: 30px !important;
  color: #232323 !important;
  position: relative !important;
}

blockquote, q {
    quotes: "" "" !important;
}

/* Custom sizes are located in media queries */
#mvp-content-main blockquote p, .mvp-post-add-main blockquote p {
  font-style: normal !important;
  font-family: 'PT Serif', sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: -.02em !important;
  line-height: 30px !important;
  margin: 30px 3% !important;
  width: 80% !important;
  word-wrap: break-word !important;
}

#mvp-content-main ul li, #mvp-content-main ol li, .mvp-post-add-main ul li, .mvp-post-add-main ol li {
    font-family: 'PT Serif', sans-serif !important;
    font-weight: 400;
    line-height: 30px;
    margin-bottom: 5px;
    margin-left: 30px !important;
}


/* Remove 'Related Posts' at bottom of Singular Articles. */
.mvp-post-tags {
  display: none !important;
}

.mvp-widget-feat1-top-story span.mvp-cd-cat {
  color: white !important;
}

#mvp-content-main p {
   max-width: 100% !important;
}

/*Table header background*/
#mvp-content-main tbody tr:first-child, .mvp-post-add-main tbody tr:first-child {
  background: #ff6600;
  text-align: left;
  color:white;
}

#mvp-content-main table, .mvp-post-add-main table {
    margin-bottom: 25px;
    color: #333333;
}

/* Ad Specific Styling */
.widget_recent_comments ul li:last-child, .widget_recent_entries ul li:last-child {
    margin-bottom: 30px;
}

/* Menu Styling */
nav.mvp-fly-nav-menu ul li.menu-item-has-children:before{
  color:white !important;
}

/* Menu Styling */
nav.mvp-fly-nav-menu ul li.menu-item-has-children:after{
  color:white !important;
}

#mvp-content-main {
  margin-bottom: 5px !important;
}

nav.mvp-fly-nav-menu ul li:first-child {
    display: none;
}

#mvp-content-main blockquote p, .mvp-post-add-main blockquote p {
    background: #ffeadc !important;
    padding: 14px;
    border-radius: 5px;
}

@media screen and (max-width: 999px) {
  

}

@media only screen and (min-width: 1000px) and (max-width: 1023px) {
    .mvp-nav-menu ul li {
    display: inline-block;
    position: relative;
    padding-left: 3px !important;
    float: left !important;
  }
  .mvp-nav-the-chamber-link {
    margin-top: 9px !important;
  }
}
/* Screen Larger than 1024px */
@media only screen and (min-width: 1000px) {
  /* hides top social bar on desktop */
  div#mvp-main-nav-top{
    display: none !important;
  }
  .mvp-nav-menu ul {
    width: auto;
  }


  /*Used to keep the custom nav sticky and pretty when scrolling up.*/
  .mvp-fixed2 {
    -webkit-transform: translate3d(0,70px,0) !important;
    -moz-transform: translate3d(0,70px,0) !important;
    -ms-transform: translate3d(0,70px,0) !important;
     -o-transform: translate3d(0,70px,0) !important;
    transform: translate3d(0,70px,0) !important;
  }
  .chamber-link-small-screen {
    display: none;
  }

  #mvp-content-main p, .mvp-post-add-main p {
    font-size: 20px !important;
  color: #333333 !important
  }

  #mvp-content-main blockquote p, .mvp-post-add-main blockquote p {
    font-size: 20px !important;
    color: #333333 !important;
  }

  #mvp-content-main ul li, #mvp-content-main ol li, .mvp-post-add-main ul li, .mvp-post-add-main ol li {
    font-size: 20px !important;
    color: #333333 !important
  }
}

/* Screen Smaller than 1024px */
@media only screen and (max-width: 999px) {
  .mvp-nav-top-right {
    width: 64px !important;
    margin-right: -13px;
  }
  .mvp-nav-top-right .mvp-nav-search-but {
    display: none;
    padding: 6px 0 7px;
  }
  .mvp-nav-the-chamber-link {
    content: url("https://pistolsfiringblog.com/wp-content/uploads/2020/01/Chamber-e1580357588365.png");
    cursor: pointer;
    max-width: 30px;
    max-height: 30px;
    float: right;
    margin-top: 0px;
  }
  #mvp-content-main p, .mvp-post-add-main p {
    font-size: 17px !important;
    color: #333333 !important
  }

  #mvp-content-main blockquote p, .mvp-post-add-main blockquote p {
    font-size: 17px !important;
    color: #333333 !important
  }

  #mvp-content-main ul li, #mvp-content-main ol li, .mvp-post-add-main ul li, .mvp-post-add-main ol li {
    font-size: 20px !important;
    line-height: 30px;
    color: #333333 !important;
  }
  .mvp-blog-story-text h2, #mvp-home-widget-wrap .mvp-flex-row .mvp-flex-story-text h2, #mvp-home-widget-wrap .mvp-flex-col .mvp-flex-story-text h2 {
    font-size: 1.15rem !important;
    line-height: 1.1em !important;
  }
  span.mvp-cd-cat, span.mvp-cd-date {
    font-size: 0.8rem !important;
  }
  
  div#comments .comment-content p {
    font-size: 17px !important;
  }

}
.mvp-feat1-feat-text span.mvp-cd-cat{
  color: #ffffff !important;
}
@media screen and (max-width: 479px) {
  .mvp-blog-story-text h2, #mvp-home-widget-wrap .mvp-flex-row .mvp-flex-story-text h2, #mvp-home-widget-wrap .mvp-flex-col .mvp-flex-story-text h2 {
    font-size: 1.15rem !important;
    line-height: 1.1em !important;
  }
  span.mvp-cd-cat, span.mvp-cd-date {
    font-size: 0.8rem !important;
  }
  div#comments .comment-content p {
    font-size: 17px !important;
  }
}

@media only screen 
and (min-device-width : 375px) 
and (max-device-width : 667px) { 
  #mvp-content-main p {
    font-size: 17px !important;
  }
  div#comments .comment-content p {
    font-size: 17px !important;
  }
}

.custom-call-to-action {
    background: #f6d8cb;
    border-radius: 5px;
    padding: 16px;
    border: 3px solid #f60;
    margin-bottom: 8px;
}

.custom-call-to-action p {
  color: #333 !important;
}

.custom-call-to-action a:hover {
  color: gray !important;
}

/* Discourse Comments Segment */
.discourse-comments-area ~ .comments-area .comments-title  {
	display: none;
}
#comments {
    clear: both;
}

#comments > ol {
    border-top: 1px solid #E0E0E0;
    padding: 15px 0px;
}

#comments .comment {
    display: block;
    padding: 10px 0px 30px;
    background-color: #FFF;
    transition: background-color 1000ms;
}

#comments .comment p {
    word-wrap: break-word;
}

#comments .fn {
    font-size:16px !important;
}

.comment-metadata {
    font-size:16px !important;
    margin-top: 5px;
}


article #comments .respond > h3 {
    margin-bottom: 5px;
}

#comments-title {
    padding-bottom: 20px;
}

h2.discourse-comments-title {
    display: none;
}

.comment-content {
    clear: left;
    padding-top: 1px;
}

.comment-content ol, .comment-content ul {
    overflow: auto;
}

.comment-content p {
    margin-bottom: 10px;
    font-size: 20px!important;
    color: #333!important;
    line-height: 1.5;
    font-family: 'PT Serif', sans-serif;
}

.comment-content > blockquote {
	font-style: normal !important;
    margin-left: 30px;
    border-left: 5px solid #eaf9ff;
    padding-left: 10px;
}

.comment-content .quote, .comment-content .onebox {
    margin-left: 30px;
    margin-top: 15px;
    margin-bottom: 10px;
    border-left: 5px solid #eaf9ff;
    padding-left: 10px;
}

.comment-meta {
    color: #808080;
}

.avatar-64 {
    margin-bottom: 10px;
}

span.says {
    display: none;
}
 */
/* begin legacy WP comments */

li.comment {
    list-style: none;
    padding: 0px 0px 25px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

section.comments {
    margin-bottom: 10px;
    margin-top: 25px;
}

section.comments {
    margin-bottom: 10px;
}

section.comments ol h2 {
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.archive .comments.wp h2 {
    display: none;
}

.archive .comments.wp {
    border: 0;
    width: 200px;
    float: left;
    padding-left: 20px;
}

.comment-content li {
    margin-left: 40px;
}

#comments .avatar {
    width: 64px;
    height: 64px;
    float: left;
    margin-right: 10px;
    border-radius: 50%;
}

#comments .avatar-25 {
    width: 32px;
    height: 32px;
    margin-right: 5px;
    border-radius: 50%;    
}

#comments h3#reply-title {
    display:block !important;
  text-align: center !important;
    color:#333 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    margin-bottom: 10px !important;
    text-transform: uppercase !important;
    padding: 5px 10px !important;
    text-shadow:none;
}
#comments  h3#reply-title a {
    color:#ff6600 !important;
    text-decoration:underline !important;
} */
/* to hide the tiny avatars */
.comment-reply-title, .more-replies {
    display: none;
}

I also need to add that this site has over 27k posts and is close to 10 years old. It has a lot of data in it. This weekend, I am going to update the theme, clean up the css, and make sure we haven’t accidentally crossed any streams.

Y’all are so awesome to look into this. I really appreciate it.

1 Like

Hey Michael, just so I’m understanding correctly:

  1. You started having a problem with Raptive.
  2. You applied the changes you’ve detailed above to the site to fix the problem.
  3. After you applied those changes the WP Discourse plugin stopped working.

Is that right?

1 Like

@angus - I hope it doesn’t sound like I’m putting the blame on Raptive - their services have been great and their customer support is fantastic. I would recommend them to just about anyone. But from what I am gathering, it did all sorta coincide. Unless I am missing something completely out of left field. ¯\_(ツ)_/¯

I did reach out to Raptive and they were very helpful and supportive on trying to help understand what is happening, including chasing a deprecation error that kept popping up in the logs.

To be sure though, I did turn their plugin back on, make sure our ad code was working, and the WP Discourse is still borked. Raptive plugin on or off didn’t seem to affect it at all as of today. I’m trying to replicate what might have happened see if I can notice anything else. Tomorrow, I’m doing a complete deep dive and reset on the site code. I’ll be as methodical as I can be so that if it is a bug or misconfiguration, in the future, we’ll be able to help others who might be experiencing this.

As you’ve alluded, the changes you made to fix the Raptive issue is the most likely cause of this issue.

Have you discussed the issue you’ve been having with the WP Discourse plugin after you made their suggested changes with them?

Just a note that if you’ve made changes in your CDN, CORS configuration, and theme, turning the Raptive plugin off and on won’t change the effect things like that have.

I don’t want to put undue blame on Raptive either, however just based on what you’ve said, it does seem like those avenues may need a bit more investigation?

In any event, please let us know how the site rebuild goes.

2 Likes

@angus - I have done a site refresh, theme update, plugin shuffle, etc. I discovered the issue and it was very hard to find. The theme we are using (a highly modified Zox News theme) had an update on the parent theme that somehow was updated along with the other plugins.

The child theme did not handle that well. Zox News theme has a place for Disqus integration and completely overrides the standard WP Comment HTML structures. I had to edit the parent theme to prevent it from displaying a comment button and basically high-jacking the WP Discourse code injection that was looking for the WP Comments structure (that was no longer there).

The site is still somewhat messy on the backend, but I will be cleaning it up through the weekend.

Here is a chunk of code that caused the issue:

    <!-- DELETE THIS from post-single.php in parent theme -->
	<!-- <div id="mvp-comments-button" class="left relative mvp-com-click">
	    <span class="mvp-comment-but-text"><?php comments_number(__( 'Click to comment', 'zox-news'), esc_html__('1 Comment', 'zox-news'), esc_html__('% Comments', 'zox-news'));?></span>
	</div>-->
    <!--mvp-comments-button-->

I’ve tested with about 5 different posts turning comments off or on. So far, things are okay. I’ll mark a solution if things go well through the weekend/week.

Thanks again, everyone!!!

2 Likes

I am trying to figure this all out as well. I have two sites that use Raptive… but my Discourse site does not.

How did you do this? Did you use the DISCOURSE_ENABLE_CORS in app.yml?

For the issue of Discourse comments not being displayed on the site, I don’t think CORS had any impact on it. The cause of the problem was that the theme that was being used on the site was preventing the Discourse comments template from loading.

What problem are you trying to solve? Is it related to the WP Discourse plugin, or is it just an issue you’re having with Raptive ads on your WordPress site?

1 Like