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.

exp:stats and the Channel parameter

December 27, 2010 4:34pm

Subscribe [5]
  • #1 / Dec 27, 2010 4:34pm

    TacomaWeekly

    17 posts

    I am building out a sitemap for a site, and I have a need to filter a usage of {exp:stats} based on a channel.  My expected code would look like this:

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

    When I run this code though, it only outputs instead of the expected date value.  When I remove the channel=“news” bit this outputs the date value of the most recent entry across all channels.

    Some notes about my usage:  MSM is installed and running multiple sites.  I do NOT intend to get results from other sites, only the site this template lives in.  The {exp:stats} tag is NOT inside of any other tags.

    Am I using this wrong?  Is what I am trying to do possible?

  • #2 / Dec 28, 2010 1:56am

    John Henry Donovan

    12339 posts

    TacomaWeekly,

    What you are doing is possible but I believe you ran into a bug. I have reported the issue on your behalf here.

  • #3 / Dec 28, 2010 1:43pm

    TacomaWeekly

    17 posts

    Thank you for submitting that bug.  Let me know if I can provide any additional information.

  • #4 / Dec 28, 2010 5:30pm

    Ingmar

    29245 posts

    Thank you for your feedback. We appreciate it.

  • #5 / Jan 01, 2011 6:37pm

    cjorgensen

    393 posts

    This is a weird bug then. Does it only surface under certain conditions? I’m not seeing this at all.

    I’m using the same code and I get output.

  • #6 / Jan 02, 2011 10:23am

    Greg Salt

    3988 posts

    Hi Christopher,

    Which version and build are you using?

    Cheers

    Greg

  • #7 / Jan 02, 2011 1:00pm

    cjorgensen

    393 posts

    ExpressionEngine is v2.1.0 Build 20101220

    I still need to upgrade, but that came out while I was finishing my redesign, so I was afraid upgrading because I didn’t have time to deal with anything working differently.

  • #8 / Jan 04, 2011 2:16am

    John Henry Donovan

    12339 posts

    Christopher,

    The bug was reported for EE 2.1.3 so if you use that tag specifically with the {last_entry_date} variable then it is very likely it will not work for you if you upgrade until a fix has been incorporated into a build

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

ExpressionEngine News!

#eecms, #events, #releases