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.

member_group == 1 Stopped Working

March 17, 2012 9:21am

Subscribe [3]
  • #1 / Mar 17, 2012 9:21am

    wiley

    37 posts

    I’ve been using track_views on my site for about two months. In conjunction with that, I’ve placed

    {if member_group == 1} ({view_count_one}){/if}

    on many of my pages to view the counts.  Over the past 2-3 weeks, on my front-end pages, these counts have been disappearing (the site thinks I’m logged out).  It first happened in Chrome, but I could still view the stats on Firefox & Safari.  But now I cannot view the counts on any browser.

    Any ideas why my front-end site would have recently started not recognizing that I’m logged into the CP?  I’ve switched among my Security & Session Prefs (both Cookies, both Session ID, and both Cookies and Session ID) and that doesn’t seem to change things.

    Thanks for your input.

  • #2 / Mar 17, 2012 7:19pm

    Are your pages cached?

  • #3 / Mar 18, 2012 8:17am

    Sean C. Smith

    3818 posts

    Hi Wiley,

    That is definitely odd behavior. If you remove the conditional does the view count display as expected? Could you try using {if member_id ==""} instead? user your member id, which should be “1” if you are the first member of the site.

    Sean

  • #4 / Mar 18, 2012 2:51pm

    wiley

    37 posts

    Regarding caching, some of my pages are cached, some are not.  The ones that are cached used to work well…they just wouldn’t update until the cache expired (which was fine).

    If I remove the conditional, the counts display fine.  ‘if member_id’ didn’t work, I assume because EE’s not recognizing that I’m logged in.

    Oddly, the stats inside ‘if member_group==1’ are still displaying fine and up-to-date when I browse using my Android phone’s browser.

  • #5 / Mar 19, 2012 4:19pm

    Dan Decker

    7338 posts

    Hey wiley,

    Be sure you value to check is quoted:

    {if member_group == '1'} ({view_count_one}){/if}

    Let me know if that works for you.

    Cheers,

  • #6 / Mar 20, 2012 11:15am

    wiley

    37 posts

    I’d had

    {if member_group == 1} ({view_count_one}){/if}

    without quotes and just added them so my conditionals are now:

    {if member_group == '1'} ({view_count_one}){/if}

    I also disabled caching for my Home page (not really something I want to do long-term).  Still, just now in Firefox as I login and logout of my CP, the stats appear and disappear as expected.  But using Chrome and Safari, the stats do not appear regardless of whether I’m logged in.

    I’m ready to dismiss this as a browser/user issue, rather than a problem with EE.  If anyone has suggestions for how I can tweak my browser settings, I’m all ears.  Otherwise, I think the EE code itself is working based upon its behavior in Firefox & on my Android.

    It’s just odd browser behavior, I suppose…

     

  • #7 / Mar 23, 2012 4:27pm

    Shane Eckert

    7174 posts

    Hey wiley,

    Sounds like a browser issue. What version of FF are you on when you see this?

    Would be good to have that info, just for reference.

    Cheers,

  • #8 / Aug 08, 2012 5:45pm

    wiley

    37 posts

    Sorry for the belated response.  After several months, this behavior is still happening.  I can see my view counts when I use Firefox, but cannot when using Chrome or Safari (both the latest versions).  Bizarre.

  • #9 / Aug 09, 2012 3:08pm

    Shane Eckert

    7174 posts

    Hey wiley,

    That is odd. Same behavior on a different machine?

    Do you have a url you do not mind sharing so I can see this as well?

    Thank you,

  • #10 / Aug 09, 2012 3:27pm

    wiley

    37 posts

    Yeah, I’ve tested on multiple machines.  Here’s a URL where the conditionals live: http://www.coyotemusic.com/

    The counts won’t appear, of course, unless you’re logged in as a Super Admin, but this is the page where they’d appear nonetheless (after each Title of each Video, Review, News item, and Artist).

    And just FYI, Chrome Version 21.0.1180.75, Firefox 14.0.1, on a Mac running 10.7.4.

  • #11 / Aug 10, 2012 12:51pm

    Shane Eckert

    7174 posts

    Hey wiley,

    I would like to log in and take a look around.

    Please be on the lookout for an email from EllisLab.

    Also, what version of ExpressionEngine are you currently running?

    Thank you,

  • #12 / Aug 10, 2012 1:05pm

    wiley

    37 posts

    Running EE 1.7.3.  Got the login msg, will reply shortly.  Thanks!

  • #13 / Aug 10, 2012 1:38pm

    Shane Eckert

    7174 posts

    Hey wiley,

    Thanks!

  • #14 / Aug 10, 2012 2:03pm

    Kevin Smith

    4784 posts

    Hi Wiley,

    Thanks for sending in your info. I checked it out using Safari, Firefox, and Chrome, and the stats appear for all three when logged-in. I think it’s got to be a cache issue, whether at the browser level or perhaps at the ISP level.

  • #15 / Aug 10, 2012 3:49pm

    wiley

    37 posts

    Thank you very much for checking it out.  I’ll investigate caching at browser and other levels.  It’s bizarre because I’ve been able to replicate the issue on Macs and PCs on different networks.  But perhaps my settings in Chrome & Safari are the same across those machines? 

    Thanks again for your help.  I’ll post back here if I find a solution to my experiences.

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

ExpressionEngine News!

#eecms, #events, #releases