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.

New discussions appearing whenever a Wordpress article is visited

Hello all,

I installed Vanilla last week for use with my WordPress installation but something weird id happening. I've chosen to use the Vanilla commenting system and I know that if you comment on an article in WordPress you'll automatically see it in Vanilla. However, what is also happening is that whenever an article is visited in WordPress--no comment attempted--a new discussion is created in Vanilla. Not a huge problem since on my site there is little reason to go to the individual article pages but it is a pain to clean up every day.

Have I set something wrong?

--Darin

Comments

  • KasperKasper Vanilla Staff
    edited November 2012

    That is how Vanilla commenting works: It creates a new discussion where all "comments" are stored even though no comments are actually written. Not optimal, but I don't know of a way to avoid this from happening.

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • Well, that a surprise and a major bummer. Clutters up the Forum big time :(

    I'm no coder but I do remember that the Fireboard forum software (now called something else) for Joomla had a similar feature but theirs only created a new discussion when someone actually wrote a comment on the Joomla side. Thus, any post in the forum had a real comment and you didn't have all these empty discussions. Much nicer and much more encouraging of actual discussions...

    --Darin

  • edited January 2013

    @darinb i just created a graveyard forum section that no one but admins could see and set new WP posts/threads to go there. then i just move the thread to the appropriate spot once i post. sort of a pain at first but then all the redundant threads don't flood my board.

  • DirtyDogDirtyDog ✭✭
    edited January 2013

    I don't know why it needs to be this way. In the gallery I'm working on a new discussion is made for a photo only after the first comment is made.

    Edit: I also have a site that for the last couple years stores reviews as forum discussions and it also only makes a new discussion once the first review is made. Not sure why the WP integration would work differently.

  • Actually people complained of the opposite. You can't please everyone all of the time, I believe it used to be as you described. People complained it wasn't making one per post.

    grep is your friend.

  • Are you saying it's creating duplicates?

    It should create 1 discussion per post. This is because, otherwise, how will your forum viewers see there is a new post to comment on?

  • No I think he is complaining it is not how it was originally which was not to do anything until someone commented.

    grep is your friend.

  • @x00 said:
    No I think he is complaining it is not how it was originally which was not to do anything until someone commented.

    Do you realize that asking questions, discussing features etc is not always complaining?

  • Yes point taken.

    grep is your friend.

  • so, if it is creating duplicates when the wp post is being viewed, is that a bug? because that's happening on my forum but i've contained semi-contained it.

  • Well, I thought I had the problem licked but maybe not--have to revive this thread.

    Just to be clear to a few of the earlier posters, the problem is that I'm using Vanilla as part of a WordPress site, not as a standalone site. In a standalone site you would, of course, need to post something in order for people to comment upon it. However, what is happening (as far as I can tell) is that whenever someone visits a WordPress article--visits but does not comment--a post appears in Vanilla with an auto-filled text of the article, etc. The discussion in Vanilla only appears once--there are no duplicates.

    I can't recall how now but I got these to appear low on the discussion list in Vanilla so they appear below any actual posts. Still filling up the forum with useless, empty discussions but at least they are out of sight. The problem is with RSS--I use an RSS widget in WordPress to display the latest discussion, to prompt people to have a conversation. In the RSS feed these "empty" discussions are appearing at the top, pushing the real "latest posts" down.

    Grrrrr. :)

    My thinking is that just visiting an article in WordPress shouldn't create a post in Vanilla. Or if you really wanted that to happen it should happen when the post is published, not randomly when someone visits the direct link--you don't want three-year-old articles popping up out of the blue.

    I'm not a coder, not even css, but I can make limited changes if I am told what to do.

    Is there anything I can do to modify this behavior?

    Thanks,

    --Darin

  • I'm working on a plugin that will immediately create a discussion when a post is published. Not sure when it will be ready.

    Add Pages to Vanilla with the Basic Pages app

  • Conceptually, at least to my mind, I'm hoping for a feature that offers the other option--create a discussion only when the first comment is made.

    The key question is "when does a discussion start?" I don't think it starts when a post is published. I think it starts when someone makes the first comment. So that's when it should appear in the discussion board.

    However, I'd love to have your plug-in instead of the one now which creates weird discussions of old articles. :)

    --Darin

  • edited April 2013

    I haven't analysed the WP/Vanilla logic in depth, but this is how I would implement a solution:

    • Tag Discussions that are automatically created by WordPress. For example, add a field called "CreatedByWP" and set it to 1 when the Discussion is created.
    • Intercept the Discussions query and add a WHERE (d.CreatedByWP = 0) clause (thou shalt not use d.CreatedByWP <> 0) as required (e.g. for RSS). In all the cases where the Discussion should be displayed, but not at the top of the list, add an ORDER BY d.CreatedByWP asc.

    The above will hide all Discussions created by WordPress in the RSS, and put them at the bottom of the list when someone visits the forum.

    When someone posts a comment on the WordPress site, handle that event and set CreatedByWP field to zero for the corresponding Discussion. The Discussion will then become a normal one, and appear like any other, as if nothing ever happened.

  • edited April 2013

    @Darinb said:
    Conceptually, at least to my mind, I'm hoping for a feature that offers the other option--create a discussion only when the first comment is made.

    The key question is "when does a discussion start?" I don't think it starts when a post is published. I think it starts when someone makes the first comment. So that's when it should appear in the discussion board.

    However, I'd love to have your plug-in instead of the one now which creates weird discussions of old articles. :)

    --Darin

    In my experience, some don't ever check the front page where the articles or blog posts are, so they won't notice that there is something new, but with communities that are large and dedicated, they tend to notice new articles sooner, unless you have a way of updating them like with a discussion on the forum.

    How many articles do you have published at the moment? What is the purpose of having Vanilla comment integration with WP?

    My plugin would be similar to the official Vanilla plugin's comment integration feature, but done differently. The plugin will use the same Vanilla comments embed. The difference between the official one is that discussions get created by a WP action and not through the embed, along with a couple extra features. It should solve some problems that people have with the official way, but these changes seems too small to have another plugin, besides the couple extra features it would have and requires that WP and Vanilla are the same server. It's basically a workaround to some problems with a little bit of icing on the cake.

    It it also possible to make it use the WP comments system instead of the embed, but there will be fewer features, such as avatars, profile links, moderation features, and so on. This feature would need user databases glued together, which is what @Lincoln's Glue plugin does. It's not a clean way of bridging the two systems, but it works.

    @businessdad: I believe that another way to do it would be to check the number of comments of an article after a new comment. If it is the first comment of the article, then call the routine for creating a discussion on Vanilla.

    Add Pages to Vanilla with the Basic Pages app

  • @Shadowdare said:
    businessdad: I believe that another way to do it would be to check the number of comments of an article after a new comment. If it is the first comment of the article, then call the routine for creating a discussion on Vanilla.

    This might not work. When embedding, Comments are posted directly to Vanilla (the comment list page appears within an iframe), and one cannot post a comment without a Discussion (that's why the Discussion is created straight away). I haven't tried it, though.

  • @businessdad, I meant if we used the WP comment form to make it so comments post to WP's database as well like @Darinb said. With the embed, you can specify which
    discussion it links to and you can hide it if the WP plugin fails to create the discussion.

    I'm not sure if it is fixed in the beta, but when I used the develop build from Github, the discussion never gets created from the embed and nothing shows up unless you specify an ID.

    Add Pages to Vanilla with the Basic Pages app

  • I have the exact same problem on my site as well. Surely, it's a bug... why would people want meaningless post automatically generated on the forum. Please could someone come up with a solution.

Sign In or Register to comment.