ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problem with comment_total

October 06, 2010 6:15am

Subscribe [4]
  • #1 / Oct 06, 2010 6:15am

    Alli

    158 posts

    I have a weblog with comments turned on. But the {comment_total} tag will not display the comment count.
    This is the code:

    {exp:weblog:entries weblog="weblogname" limit="1"}
    <div class="post-title">
    <div class="post-comment"><a href="#comments">({comment_total})</a></div></div>
    {/exp:weblog:entries}

    Can anyone suggest what the problem might be?

    Thanks

  • #2 / Oct 06, 2010 4:29pm

    Ingmar

    29245 posts

    What version and build of EE are you using? Are you nesting this with {exp:comment:entries}, perhaps?

  • #3 / Oct 08, 2010 8:22am

    Alli

    158 posts

    I am using ExpressionEngine 1.6.9 Build:  20100430

    the comment total is not nested with the {exp:comment:entries}.

    here’s the complete code (with most styling removed)

    {exp:weblog:entries weblog="beertalk" limit="1"  }
    <div class="post-comment"><a href="#comments">({comment_total})</a></div>
    {entry_date format="%M"}
    {entry_date format="%d"}
    {title}
    {categories}
      <a href="http://{path=beertalk/categories}"> {category_name}</a>  
    {/categories}
    <div class="post-body">
    {if blogimage}{blogimage}{/if}
    {if blog_mainbody}{blog_mainbody}
    {/if}
    {if blog_website_link}
    <h4><a href="http://{blog_website_link}" target="_blank" rel="noopener">Website Link</a></h4>
    
    <p>{/if}<br />
      {lg_social_bookmarks permalink="{title_permalink='beertalk/view'}" title="{title}"}<br />
        </p><h4>Enjoy this post? Share it with others.</h4>
    <p>    <ul class="post-social"><br />
          {social_sites}<br />
            <li><br />
              <a href="http://{social_site_url}" title="Bookmark on: {social_site_name}">_            /themes/cp_global_images/lg_social_bookmarks/favicons/{social_site_img_url}  _          </a><br />
            </li><br />
            {/social_sites}<br />
        </ul><br />
      {/lg_social_bookmarks}<br />
    {/exp:weblog:entries}

  • #4 / Oct 08, 2010 11:20am

    Ingmar

    29245 posts

    I don’t see why that shouldn’t work. Do you have comments enabled for that entry? Are there, in fact, comments?

  • #5 / Oct 09, 2010 9:00am

    Alli

    158 posts

    Yes comments are allowed and yes there are comments in the entry.
    The comments are displaying okay, it is just the comment count that is not working for any entry!

  • #6 / Oct 10, 2010 1:58pm

    Greg Salt

    3988 posts

    Hi Alli,

    Can I ask you to upgrade to the latest build if at all possible so that we can troubleshoot with the most up to date code in place. Were the comments added via a comment form on this site or perhaps imported in some way?

    Cheers

    Greg

  • #7 / Oct 11, 2010 5:59am

    Alli

    158 posts

    Hi Greg

    I upgraded to the latest build but i forgot to say that the MSM is also installed on this system.

  • #8 / Oct 11, 2010 4:55pm

    Ingmar

    29245 posts

    Did you upgrade the MSM as well? Also, to repeat Greg’s question, were the comments added via a regular comment form?

  • #9 / Oct 11, 2010 7:14pm

    Alli

    158 posts

    hi

    Yes, as far as I know the MSM is up to date.

    The comments were added via a regular comment form.

  • #10 / Oct 12, 2010 11:50am

    Sue Crocker

    26054 posts

    If you try with a very minimal template, does that work? Do you have a link we can see?

  • #11 / Oct 12, 2010 5:10pm

    Alli

    158 posts

    Hmm, strange.. they comment numbers have suddenly started working! It has probably been the upgrade to the latest build and I didn’t cleared my cache properly!

    Anyway, problem solved- whatever it was. Thanks for all your help.

  • #12 / Oct 13, 2010 9:34am

    Sue Crocker

    26054 posts

    Glad things are working again. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases