Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

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

Event Calendar problem

Go to End

21 Posts   2649 Views


26 May 2009 at 3:57am Community Member, 13 Posts


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

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       }
45       parent::setOwner($owner);
46    }


* 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. :)



26 May 2009 at 4:29am 4085 Posts

Can you try the proposed solution mentioned here:

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


26 May 2009 at 1:38pm Community Member, 13 Posts

Hey Uncle Cheese,

It is still throwing the same error.

I am attaching the _config herel with this post.

Thanks for your help.



26 May 2009 at 1:57pm 4085 Posts

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


10 June 2009 at 11:14pm Community Member, 13 Posts

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!



11 June 2009 at 12:23am Community Member, 42 Posts

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 -

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....



11 June 2009 at 1:12am Community Member, 13 Posts

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



11 June 2009 at 1:25am 4085 Posts

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

Go to Top