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.

total_members not working in {exp:stats}

February 12, 2011 12:49pm

Subscribe [6]
  • #1 / Feb 12, 2011 12:49pm

    JCDerrick

    57 posts

    I’m not sure exactly what’s causing the count for total registered users to be off, but in the backend I get a total that’s different than I do on the front end.

    Can anyone else replicate this problem? I cleared all the cache and still no luck.

    Below is my exact code, embedded in a template (without caching) called ‘includes/stats/’

    {exp:stats}
              <div class="generic_layout_container layout_core_statistics">
                <h3>Network Stats</h3>
    <p>            <ul><br />
                  <li> <span>{total_members}</span><br />
                    <div>members</div><br />
                  </li><br />
                  <li> <span>{total_logged_in}</span><br />
                    <div>logged in</div><br />
                  </li><br />
                  <li> <span>{total_guests}</span><br />
                    <div>guests</div><br />
                  </li><br />
                  <li> <span>{total_anon}</span><br />
                    <div>anonymous users</div><br />
                  </li><br />
                  <li> <span>{total_entries}</span><br />
                    <div>entries</div><br />
                  </li>  <br />
                  <li> <span>{total_comments}</span><br />
                    <div>comments</div><br />
                  </li><br />
                  <li> <span>{most_visitors}</span><br />
                    <div>record visits</div><br />
                  </li><br />
                {if member_names}<br />
                    <li><strong>Logged-in Members:</strong> <br />
                    {member_names  backspace='1'}<a href="http://{member_path=site/profile}">{name}</a>, {/member_names}</li><br />
                {/if}                 <br />
                </ul><br />
              </div><br />
              {/exp:stats}

    Thanks,
    John

  • #2 / Feb 13, 2011 2:12pm

    Greg Salt

    3988 posts

    Hi John,

    Can you give us a little more information? What totals are you seeing? How many registered members does your site have? Which version and build of EE are you using? Do you have the Discussion Forum module installed?

    Cheers

    Greg

  • #3 / Feb 13, 2011 2:16pm

    JCDerrick

    57 posts

    Hey Greg, sorry I meant to do that.

    It’s EE 2.1.3, and it’s a brand new site, so we’re only talking about 40 something members - no discussion forum. But the count is stuck at 9 members on the front end. It never moves higher than 9 for some reason. All my other sites are still 1.7.0, so I can’t test this on those at this time unfortunately.

  • #4 / Feb 14, 2011 3:47am

    John Henry Donovan

    12339 posts

    JCDerrick,

    Can you Perform a recount of your stats and see if issue persists?

    Tools > Data > Recount Statistics

  • #5 / Feb 14, 2011 9:01am

    JCDerrick

    57 posts

    Thanks, gave that a shot but it still says 31 on the backend and 9 on the front end. Any chance this has anything to do with the fact most of the site is run on the front end, including the registration process? I heavily user the User module, but I guess that still wouldn’t explain why the count differs from the front to backend.

  • #6 / Feb 14, 2011 10:06am

    Sue Crocker

    26054 posts

    Hi, JCDerrick. What’s the breakdown of member groups? Are you using any groups other than the Members group?

  • #7 / Feb 14, 2011 10:14am

    JCDerrick

    57 posts

    I have a Business member group and a Individuals member group, which are the only two options on registration. I am bypassing the regular Member’s Group. Here’s the breakdown currently.

    Individuals (19)
    Business (10)
    Members (0)
    Super Admin (2)

    Do I need to turn the count on to recognize those two groups in any way?

  • #8 / Feb 14, 2011 10:40am

    Sue Crocker

    26054 posts

    No, you shouldn’t have to. What other add-ons do you have installed?

  • #9 / Feb 14, 2011 10:46am

    JCDerrick

    57 posts

    A bunch honestly. This is a pretty complex EE site. The only one that’s suspect might be Friends, but I will look and see if anyone else has reported problems with it at Solspace.

    Modules
    Channel Ratings
    Channel Videos
    Code Park (Solspace)
    Deeploy Helper
    Favorites
    FBC
    Freeform
    Friends
    Geofinder
    Geotagger
    MX Google Map
    Playa
    SafeCracker
    Tag
    User
    Wygwam

    Extensions (not including above)
    Low Seg2Cat
    Matrix
    SAEF Redirect

    Plugins
    AJW Feed Parser
    CE Image
    EE2 Child Categories
    Delete
    Edit Comments
    HJ Social Bookmarks
    ImageSizer
    TrunchHTML

  • #10 / Feb 14, 2011 10:53am

    Sue Crocker

    26054 posts

    Sounds good to me, because about all I can recommend is to turn off all extensions and see if you can get things to work that way.

  • #11 / Feb 14, 2011 11:00am

    JCDerrick

    57 posts

    I was worried that might be the only way. Quick question, just to make sure I do this right. Isn’t there a way to disable extensions without loosing the data? I want to cut them off but don’t want to loose my data. At least then I can say if it’s those or not.

    Thanks

  • #12 / Feb 14, 2011 12:01pm

    JCDerrick

    57 posts

    I disabled all the Extensions and it still was giving me the 9 count number. Very strange. I’ll keep trying things.  I don’t think I can disable modules without deleting data, so I might just have to do without this stat.

  • #13 / Feb 14, 2011 3:38pm

    Ingmar

    29245 posts

    Please let us know what you find out. I am not able to reproduce that behavior on my setup.

  • #14 / Nov 16, 2011 4:26pm

    hellodaylight

    26 posts

    I just came across a similar issue on a site I’m working on. The site displays a member count on the front end, and my client emailed saying that the members count on the site wasn’t updating, even though she knew some people who signed up. When I checked the members list in the back end and compared it, it was off by about 8 members, and wouldn’t update no matter how many times I reloaded the page.

    It seemed to update only after I went into Recount Stats and did a recount on each one. But the problem persists. I have caching turned off on my templates.

    Any ideas?

    FYI: EE 2.3.1 with User module.

  • #15 / Nov 21, 2011 3:26pm

    Robin Sowell

    13255 posts

    Both of you are using the ‘User module’, so just noting that in case it needs a closer look.

    That said- in ‘Admin- Security- Tracking Prefs’, do you have ‘Enable Online User Tracking?’ set to ‘Yes’?  That handles updating the member count for the stats module.  If it’s being read as ‘n’, the stats count (in exp_stats) will pretty much get stuck.

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

ExpressionEngine News!

#eecms, #events, #releases