Support » Plugin: ecSTATic » possible bug – load latest

  • 0.9871
    hi Mike
    i haven’t looked at the stats in a couple days, so when i looked at them today and clicked the ‘load latest’ button, i expected to see the stats starting from the lat time i viewed them, but instead none are loaded

    am i expecting the wrong thing, or is it not working as intended?

    would also suggest an option to load only the latest stats when the pages are loaded so you don’t have to click the ‘load latest’ button. maybe this would also reduce db queries ??? i’m on a shared server and it can sometimes take a long time to load the main page

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author MikeSoja


    The stats don’t change from load latest to load all. The only thing that changes is the little blurb that serves as a title to whatever list of hits you’re looking at.

    “load only the latest stats when the pages are loaded”

    I’ve been thinking about it, but it’s very complicated.

    The Settings checkbox would be easy, but how to save the time of the last record retrieved would be harder. The options table isn’t really set up for something like that, as it would require a recurring db write of the “latest” value, and the Settings are written as a group every time (but only when changed in the Settings page.) I could send the value to the WordPress options table, but so far, I’ve not done that for anything, as I don’t like the clutter other plugins leave behind when they’re uninstalled.

    A further complication of having a Setting is the need to go and toggle it when you want the other view.

    Or, possibly, don’t use a Setting, but if the user pushes the “Load Latest” button, the last time value is written to a WP Option, which is used on subsequent page views, and pushing the “Load All” button sets it to 0, meaning “Load All”. That might make it possible to eliminate the short form code that picks up the value now.

    However, then there’s the problem of WHICH latest value to write. I have my pages reload periodically, but if I leave the computer I don’t want to come back and find only the hits from the latest reload. So, maybe only write the value on an explicit button push.

    As you can see, I’m thinking.

    Plugin Author MikeSoja


    There ya go. It works in early testing, but with a small side effect.

    If, like I do, you keep one window open to the Main Panels, and another for Sequential View, then a “Load Latest” in one page will change the value for the other, meaning it would be possible to miss some entries in the other page as you switch between them. The workaround would be to write two separate values to the WordPress Options table, and I already feel bad about writing one. However, I doubt it’s a problem that many people will be unable to cope with, so I’ll leave it at that.

    If you want to test the change, retrieve ecstatic.php and ecstatic_interface.php from the trunk in the WordPress repository and copy them over your existing files.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘possible bug – load latest’ is closed to new replies.