Jump to:

10993 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar problem

Discuss all other Modules here.

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

Page: 1 2 3
Go to End
Author Topic: 2622 Views
  • SJ
    Avatar
    Community Member
    13 Posts

    Event Calendar problem Link to this post

    HI,

    I have installed latest available version of event_calendar from net. Then i executed run db command which worked fine. But as soon as i tried to open the admin screen , i got below mentioned errors:

    [User Error] DataObjectDecorator->setOwner(): Trying to decorate an object of class 'CMSMain' with 'CalendarScriptInit', only Dataobject subclasses are supported.
    GET /silverstripe/admin/

    Line 41 in C:\wamp\www\silverstripe\sapphire\core\model\DataObjectDecorator.php
    Source

    32     * @param DataObject $owner
    33     */
    34    function setOwner(Object $owner) {
    35       if(!($owner instanceof DataObject)) {
    36          user_error(sprintf(
    37             "DataObjectDecorator->setOwner(): Trying to decorate an object of class '%s' with '%s',
    38             only Dataobject subclasses are supported.",
    39             get_class($owner), $this->class),
    40             E_USER_ERROR
    41          );
    42          return false;
    43       }
    44       
    45       parent::setOwner($owner);
    46    }
    47    

    Trace

    * DataObjectDecorator->setOwner(): Trying to decorate an object of class 'CMSMain' with 'CalendarScriptInit', only Dataobject subclasses are supported.
    Line 41 of DataObjectDecorator.php
    * DataObjectDecorator->setOwner(CMSMain)
    Line 456 of Object.php
    * Object->__construct()
    Line 74 of RequestHandler.php
    * RequestHandler->__construct()
    Line 277 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    * Director::direct(/admin/)
    Line 117 of main.php

    It would be appreciable if anyone can help me out.

    Thanks,

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar problem Link to this post

    Can you try the proposed solution mentioned here:
    http://www.silverstripe.org/all-other-modules/show/261249?start=0#post261267

    Let me know if it works and I'll check in the change.

  • SJ
    Avatar
    Community Member
    13 Posts

    Re: Event Calendar problem Link to this post

    Hey Uncle Cheese,

    It is still throwing the same error.

    I am attaching the _config herel with this post.

    Thanks for your help.

    SJ

    Attached Files
  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar problem Link to this post

    Alright, I'll take a look at it. Hopefully I can get something figured out before 2.3.2 is released.

  • SJ
    Avatar
    Community Member
    13 Posts

    Re: Event Calendar problem Link to this post

    Hello Uncle cheese!!

    COuld you find the solution of the problem i sent you? As soon as i have installed Event calendar module.. my admin page is not opening...

    Thanks for your help!

    SJ

  • Anaya
    Avatar
    Community Member
    42 Posts

    Re: Event Calendar problem Link to this post

    Hey SJ,

    I have installed event calendar last week. Had few issues..but everything is working fine now.
    I have checked the config file you have attached with mine, only difference I can see is on line 8 -
    Instead of -
    Object::add_extension('LeftAndMain', 'CalendarScriptInit');
    change to
    DataObject::add_extension('LeftAndMain', 'CalendarScriptInit');

    I have downloaded event calendar from the below link -
    http://bluehousegroup.svn.beanstalkapp.com/modules/trunk/event_calendar/

    if u downlaod the files/folders form above link, pls check the above line (line 8) in config file....
    just small thing - pls try to delete the existing event_calendar folder, run /db/build?flush=1 and then upload the new files/folder and run db again...I am using SS version 2.3.1

    Let me know it works for you or not....

    Regards

  • SJ
    Avatar
    Community Member
    13 Posts

    Re: Event Calendar problem Link to this post

    Hey Uncle Cheese!!

    Thanks!! now i can see the admin page and page type related to event module.
    But in the Configuration page, as shown in the installation document, i couldnt find "Event Description Behavior" in configuration tab.

    The only headings i can see are:

    Number of events to display on default view.
    Default date header (displays when no date range has been selected)
    Number of future dates to show for repeating events

    Regards,
    SJ

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar problem Link to this post

    Are you still on the download version or are you using SVN now?

    2622 Views
Page: 1 2 3
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.