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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Event Calendar problem


Go to End


21 Posts   4389 Views

Avatar
SJ

Community Member, 13 Posts

26 May 2009 at 3:57am

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,

Avatar
UncleCheese

Forum Moderator, 4102 Posts

26 May 2009 at 4:29am

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.

Avatar
SJ

Community Member, 13 Posts

26 May 2009 at 1:38pm

Hey Uncle Cheese,

It is still throwing the same error.

I am attaching the _config herel with this post.

Thanks for your help.

SJ

Avatar
UncleCheese

Forum Moderator, 4102 Posts

26 May 2009 at 1:57pm

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

Avatar
SJ

Community Member, 13 Posts

10 June 2009 at 11:14pm

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

Avatar
Anaya

Community Member, 42 Posts

11 June 2009 at 12:23am

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

Avatar
SJ

Community Member, 13 Posts

11 June 2009 at 1:12am

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

11 June 2009 at 1:25am

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

Go to Top