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.

Statistics display module Problems

November 06, 2011 1:24pm

Subscribe [5]
  • #1 / Nov 06, 2011 1:24pm

    scottmey

    15 posts

    Greetings,

    I have had Statistics working on my site for a while now in two instances, but just noticed today that they are not working in either case now. Not sure if it happened during 2.3.1 upgrade. But when I got to the exp_stats table in the database all the information is there. But the tags don’t seem to be parsing in my templates.

    Any suggestions?

    <section class="visitors">
                {exp:stats}
                 <div class="heading">
                  <h2>Rolling Deep…</h2>
    <p>              Most visitors ever was {most_visitors} on {most_visitor_date format="%l %F %d, %Y at %h:%i %A"}<br />
                  Currently Active Users: {total_logged_in}<br />
                 </div><br />
                {/exp:stats}<br />
                {exp:stats}<br />
                 {if member_names}<br />
                  <ul><br />
                   {member_names}<br />
                    <li>{if member_group == '8'}<a href="http://{member_path=members/profile}">{if:else}<a class="author" href="{member_path='members/profile'}">{/if}{name}</a></li><br />
                   {/member_names}<br />
                  </ul><br />
                 {/if}<br />
                {/exp:stats}<br />
               </section>

    {exp:stats}
       <ul class="list">
        <li><a href="http://{path=%27members%27}" title="12ozProphet Members">{total_members} Registered Members</a></li>
        <li><a href="http://www.12ozprophet.com/forum/">80,000+ Forum Discussions</a></li>
        <li><a href="http://12ozprophet.com/forum/memberlist.php">5,425,500+ Forum Comments</a></li>
        <li><a href="http://{path=%27blogs%27}" title="12ozProphet News Entries">{exp:channel:entries channel="news" limit="1"}{total_entries} News Entries{/exp:channel:entries}</a></li>
        <li><a href="http://{path=%27blogs%27}" title="12ozProphet Blog Entries">{exp:channel:entries channel="not news" limit="1"}{total_entries} Blog Entries{/exp:channel:entries}</a></li>
        <li><a href="http://{path=%27%27}" title="12ozProphet Comments">{total_comments} Comments</a></li>
       </ul>
      {/exp:stats}
  • #2 / Nov 07, 2011 10:22am

    Sue Crocker

    26054 posts

    Hi, Scott. What part is not working for you?

  • #3 / Nov 07, 2011 10:26am

    scottmey

    15 posts

    Any Instance of Stats is now not working, it was working previously, I had updated to 2.3.1 recently but just notice the problem now. There are actually about five instances, and nothing gets parsed. Not one single tag..?

  • #4 / Nov 08, 2011 6:27am

    misc

    54 posts

    I have similar problems:

    {exp:stats}{last_entry_date format="{DATE_W3C}"}{/exp:stats}

    ... is for example not working (no result).

    v2.3.1 - Build: date 20111017

  • #5 / Nov 08, 2011 11:43pm

    Dan Decker

    7338 posts

    Hi Scott,

    I took both yours and misc’s code and plugged it straight into my test installation and they both returned results. It may make a difference that my test is on a clean installation and not an update.

    I would like to ask each of you what add-ons you might be using and if they are all up to date? Also, can you post the full contents of the affected templates incase there are some other things in play here?

    Thanks!

  • #6 / Nov 09, 2011 3:00am

    misc

    54 posts

    This is my template code:

    <urlset> 
     <url> 
      <loc>{homepage}</loc>
      <lastmod>{exp:stats}{last_entry_date format="{DATE_W3C}"}{/exp:stats}</lastmod>
      <changefreq>always</changefreq> 
      1.0</priority> 
     </url>
    </urlset>

    Beside the official add-ons I have just the Solspace Tag module installed.

    And in exp_stats the ‘last_entry_date’ has a value (a timestamp, not zero).

  • #7 / Nov 09, 2011 11:31am

    misc

    54 posts

    With the channel parameter, it is working:

    {exp:stats channel="main"}{last_entry_date format="{DATE_W3C}"}{/exp:stats}
  • #8 / Nov 10, 2011 9:14am

    Sue Crocker

    26054 posts

    So, misc—you all set now?

    scott - what about you?

  • #9 / Nov 10, 2011 9:33am

    misc

    54 posts

    To use the channel parameter is just a workaround. Based on the user guide it should also work without ...

  • #10 / Nov 12, 2011 6:20am

    Robin Sowell

    13255 posts

    Hrm- like Dan, I can’t replicate on my install.

    Let’s do this- a test template with nothing else on it- put just:

    Stat test
    <hr>
    {exp:stats}last entry date: {last_entry_date format="{DATE_W3C}"}{/exp:stats}

    Does ANYTHING show up aside from ‘Stat Test’ at the top.  In other words- ‘last entry date’ should be showing up at the very least.

    Then- go to ‘Admin- System Prefs- Output and Debug’ and turn ‘Display Output Profiler?’ and ‘Display Template Debugging?’ on.  View the test page while logged in as superadmin.  In the Template parsing output- paste back what you get between ‘Begin Tag Processing’ and ‘End Tag Processing’.  Mine looks like the below.

    (0.014077 / 4.30MB) - Beginning Tag Processing -
    (0.014101 / 4.30MB) Parsing Tags in Template
    (0.014128 / 4.30MB) Tag: {exp:stats}
    (0.014169 / 4.30MB) Closing Tag Found
    (0.014208 / 4.30MB) Processing Tags
    (0.014238 / 4.30MB) Module Tag: Stats/
    (0.014252 / 4.30MB) Including Files for Plugins and Modules
    (0.018038 / 4.35MB) Files for Plugins and Modules All Included
    (0.018649 / 4.36MB) Beginning Final Tag Data Processing
    (0.018667 / 4.36MB) Calling Class/Method: Stats/
    (0.018811 / 4.36MB) -> Class Called: Stats
    (0.019499 / 4.36MB) -> Method Called: Stats
    (0.019563 / 4.36MB) -> Data Returned
    (0.019592 / 4.35MB) - End Tag Processing -

    Then let’s see if anything is super weird with the queries.  The one we’re interested in look something like:

    SELECT *
    FROM (`exp_stats`)
    WHERE `site_id` =  '1'

    Paste that query back- let me know if it doesn’t exist.  If it DOES exist- go run it in the query form (Tools- SQL Manager) and paste back the results.  Don’t worry with the format- it will get borked, but I can read it. 

    Could be nothing is being returned- which would explain nothing showing in the stats module.  But that would be really weird.

     

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

ExpressionEngine News!

#eecms, #events, #releases