Support » Plugin: Weekly Class Schedule » class posting to wrong day

  • I used this on a client site 5 months or so ago and everything was fine. Now I find she is having classes scheduled on Sunday showing on Saturday. Saturday classes show on Friday and Friday classes don’t show at all. I updated the plugin to the new version to no avail. Any thoughts?
    <a href=""></a>

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author ty_pwd


    Sounds like a timezone issue. Make sure the timezone for the site is set up correctly.

    The timezone all checks out. The problem is the events are only posted wrong for Friday, Sat, and Sunday. All other days test normal. Not sure what to do.

    Hi all,

    I had to look into the issue myself as I was getting the same problem here as Jeff. I do believe it might be some issue with the latest version of PHP possibly? I’m not too sure if that’s right, nonetheless, I was able to resolve the issue on the website I work on.

    Go into backend > Plugins > Editor > choose WCS in dropdown at top right.

    Now look through the list and find: WcsTodayClassesWidget.php

    You have to make one edit which is to look for:

    >> $today = date( ‘w’, strtotime( ‘now’ ) );

    ADD “- 1”:

    >> $today = date( ‘w’, strtotime( ‘now’ ) ) – 1;

    Save and check the widget. It worked for me. Hope it does for you.

    UPDATE: Ok, I did find one issue though. I also use the Today’s Classes as a sidebar widget. The sidebar widget matches the front page on every page except the page with the Schedule on it. (now a day behind) (same as index, correct day) (correct day)

    Any thoughts on this Ty or anyone else with PHP expertise?

    UPDATE #2:

    I checked the website the very next morning and the widget was now displaying a day minus one now, since that is what I changed in the code. It’s very confusing because yesterday that code seemed to have changed it to display properly. So I edited the same line of code and removed the “- 1” and now everything is back to normal.

    What could have caused this? I can assure you my timezone settings are set at Los Angeles and displays the appropriate time. Any help is still appreciated.

    To sc0o8i3, I’m thinking something broke in the code and don’t know where that would be so I’m having the client copy/save all the class/teacher info text. I was then going to completely remove the plugin and try to re-install it to see if that helps. The strangest thing for me was that the classes only posting wrong on two of the days. Anyway, when the client finishes her end I’ll report back.

    Greetings. So I killed all the databases and re-installed it. I did some test and it seemed fine. Then the client put all her info back in and it was screwed again. After poking around, it seems the second instructor listed in the db and the second class listed in the db were breaking the table causing some classes to post on the wrong day. I added a duplicate instructor and class and then switched names so all looks as it should, and now it works. There is something wrong with the second entry into the db. The client uses Godaddy, not sure if it is some PHP version issue or what. All quite strange, but lets keep everything crossed!-j

    Greetings: I have been having issues with the daily schedule widget displaying the classes one day ahead of schedule instead of the current classes. Any suggestions on how to fix?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘class posting to wrong day’ is closed to new replies.