Questions about comments

Kyle Fox's Avatar

Kyle Fox

06 May, 2010 05:45 AM via web

I'm manually importing comments and noticed I'm unable to edit a comment's timestamp. As a result all my imported comments show that they were posted today. Is there any way to edit them?

Also, it seems like the comment form on the public-facing site doesn't result in a redirect. I pressed refresh after posting my comment and it prompted me to post it again. I've worked on apps where this occurs, and it very frequently results in duplicate comments when the user doesn't understand what that "Post form data again?" dialog means.

  1. 2 Posted by John Nunemaker on 07 May, 2010 09:45 PM

    John Nunemaker's Avatar

    There is no way to edit the timestamp right now. We still have work to do to
    make it easier to move existing sites in.

    As per the redirect, we have no way to pass a success message if we redirect
    without jamming something in the query string. We'd rather not add a query
    string as then people might bookmark that or something. I am not super
    passionate about this decision, but it feels a little cleaner just rendering
    than redirecting some info. If double comments become an issue we can look
    into it.

  2. 3 Posted by Tim Riley on 11 Feb, 2011 09:00 PM

    Tim Riley's Avatar

    I've just recently build and launched my first site with Harmony (A wonderful tool, BTW!), and we've been seeing the double comment problem on nearly half of our comments.

    One though I had was to add a message upon successful comment submission that it will be on the site in a moment, just after the spam check is complete. The trouble is that there is no simple way to instruct the user to freshly load the current page (not reload and post the same form data) in order to see their comment.

  3. 4 Posted by Tim Riley on 12 Feb, 2011 01:05 AM

    Tim Riley's Avatar

    It turns out avoiding the double-posting was a big enough issue for my users that I've had to put in place some measures to prevent it.

    In the comment form in my blog.post.tpl, underneath where I display the "we're received your comment" message, I actually load the page afresh, to ensure there's no post data hanging around:

    {% commentform %}
      {% if message %}
        <div class="message">
          <p>{{message}}</p>
          <script>
            window.location = 'http://' + window.location.host + window.location.pathname + '?comment=added#comment-form';
          </script>
        </div>
      {% else %}
        <!-- comment form fields, etc. -->
      {% endif %}
    {% endcommentform %}
    

    When the page loads again, I still need to show a message about a the successful comment post, so I put the ?comment=added argument on the end of the URL. I have some javascript which interprets it:

    $(document).ready(function() {
      // getUrlVars turns the URL arguments into a hash
      var commentResult = getUrlVars()['comment'];
      if(commentResult == 'added') {
        $('#comment-added-message').show();
      }
    });
    

    The usually hidden #comment-added-message div is shown to the user with the above code, and it says this:

    "Thankyou! Your comment has been received. It should appear on this page within the minute. Try refreshing the page to see it."

    At least now they can refresh the page a few times until their comment appears, without accidentally reposting their comment (if they don't understand the browser warnings about reposting form data).

    The downside to this (apart from the fact that we've had to load the same page twice) is that if they refresh the page, the URL args stay around, so the success message remains on screen even once their comment finally appears, but this is a relatively minor issue that we'll just have to put up with in order to avoid the double comment problem.

    John, I can understand why you handled the comment posting in this way, exactly for the issue with the URL arguments that I mentioned above. Anyway, I just thought I would mention for feedback purposes that the comment workflow (the delay in the comments appearing, and the form data re-posting) is probably the biggest pain point we have with how the public users interact with our Harmony site. Hope this is helpful :)

  4. 5 Posted by John Nunemaker on 14 Feb, 2011 02:53 PM

    John Nunemaker's Avatar

    Thanks for reporting. We have a few ideas to help with this, but the only reason this is painful is because of stupid spammers. We use defensio to check if a comment is legit or not and have to do these checks in the background as waiting for external services to respond can easily use up all your resources when checking live.

  5. John Nunemaker closed this discussion on 14 Feb, 2011 02:53 PM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

17 May, 2012 10:45 PM
20 Mar, 2012 05:05 PM
26 Apr, 2012 01:40 AM
07 Mar, 2012 04:42 PM