1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. To combat forum spam, we are temporarily disabling the ability to create new accounts for the forums. Please feel free to open a support ticket through out client area with any support issues. You can also search the forums for answers to many questions.

Wrong Default Month and Year

Discussion in 'Installation / Upgrade Questions' started by froye001, Sep 18, 2009.

Thread Status:
Not open for further replies.
  1. froye001

    froye001 New Member

    My calendar does not default to the current month, day and year.

    When you first land on the calendar page, it displays "January 2009" (2009 happens to be the Year Selection Start entered in the setup.

    When you click the "Today" button, the calendar displays "January 2009" but the url ends with "mo=09&yr=0000"

    When you click to advance a month, the calendar shows "February 2009" and the url ends with "mo=2&yr=2009"

    At no point does the current day highlight even though Highlight Today is selected in the setup.
  2. Brian

    Brian EPC Developer Staff Member

    Can you provide a link to the page with the issue?
  3. froye001

    froye001 New Member

  4. Brian

    Brian EPC Developer Staff Member

    Haven't seen this before... If no date is specified, the calendar uses the PHP date function to tell it what the current month/year to display.

    Did it do this from the very first time it was installed or did it happen later?
  5. froye001

    froye001 New Member

    Did it from the very start.

    It behaved the same way on our test server which didn't concern me because that server has all kinds of junk on it. But this is on our live server which is pretty clean.

    What can I give you to help trouble-shoot? PHP and Apache version info?

    Is there code I could insert temporarily to get this calendar launched? Explicitly set the default month and year maybe?
  6. Brian

    Brian EPC Developer Staff Member

    You can set the $mo variable to 9 ($mo=9;), but then you can't change the month. PHP should be reporting the correct month to the calendar, but it isn't or someone modified part of the calendar code that changed how this works.

    Can you open a support ticket and attach your calendar/calendar.php file?
  7. froye001

    froye001 New Member

    Ticket: QLS-569520

    I hacked it! I added:

    if($_REQUEST['mo'] == '') { $mo = 9; }
    if($_REQUEST['yr'] == '' || $_REQUEST['yr'] == '0000') { $yr = 2009; }
    require ("../cal/calendar.php");

    which buys us a little time.

    I'm going to make a version live then return the test page referenced above to it's broken state. Thanks for all your help.
  8. ve9gra

    ve9gra Support Team

    Before you do that, try to echo out $mo in case your site somehow uses that variable somewhere. That could account for reset to 1... but I'm not sure it would explain you being able to then navigate from that point.
Thread Status:
Not open for further replies.

Share This Page