Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Calendar error

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1895 Views
  • Louie
    Avatar
    Community Member
    9 Posts

    Calendar error Link to this post

    I'm using the calendar module, and when I created the function Calendar in my page.php I get this error, it left me stuck.

    Fatal error: Access to undeclared static property: Calendar::$views in /home/coaadmu/public_html/coa/calendar/code/CalendarYear.php on line 8

    Anyone out there having the same problem?

  • Apophenian
    Avatar
    Community Member
    46 Posts

    Re: Calendar error Link to this post

    I am getting this problem - did you find a solution?

  • Apophenian
    Avatar
    Community Member
    46 Posts

    Re: Calendar error Link to this post

    Ok, changing CalendarYear to something like this seemed to help:

    class CalendarYear extends Calendar {
       
       // Constructor
       
       function __construct( $controller, $year = null ) {      
          parent::__construct( $controller, 'Year', array(new CalendarMonthView('Month')) );
       }
    }

    1895 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.