Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

WordPress: Vanilla integration is boogering up comment counts that are WordPress native comments

HackerDonHackerDon New
edited January 2015 in Vanilla 2.0 - 2.8


I'm using the following:

WordPress 4.1
Vanilla plugin for WordPress 1.1.14
Vanilla forums 2.1.8p2

I have gotten integration between a self hosted instance of Vanilla and WordPress working pretty well, including shared logins and forum embedding within a dedicated WordPress page.

Now, there is one significant bug I am experiencing. Even with Vanilla comment integration (which I do not want) turned OFF in WordPress, the comment counts are messed up in every single blog post on the site. Every single one displays as no comments.

The commenting box that is displayed in the WordPress blog is the WordPress native comment box.

What happens when a page containing any blog posts is displayed is that: I first see the correct comment count display at the top of the blog post, and then it is immediately overwritten (as I watch) with the label "No comments". It looks like Vanilla's integration code is using Javascript to whack the comment count HTML to display the Vanilla equivalent. It's happening just slow enough that I see it change.

The HTML that I see in the Firefox inspector after this happens looks like this:

 <span class="entry-comments-link">
    <a href="">
        <span vanilla-identifier="2745">
            No Comments

Because the Vanilla code has garbaged the URL for the comments with a non existent #vanilla-comments address, the comments can't be clicked by the user.

If I examine the Page Source, the original HTML that is apparently being overwritten looks like this:

<span class="entry-comments-link">
   <a href="">
     <span vanilla-identifier="2745">

A fix, please? I apologize if this has been discussed... I did not find any other threads discussing this issue.



  • hgtonighthgtonight ∞ · New Moderator

    Thanks for posting back with your solution!

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Thank you very much for your solution HackerDon, saved me a lot of headache!

Sign In or Register to comment.