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

HasManyFiles SS 2.3.3


Go to End


5 Posts   2055 Views

Avatar
wardog

Community Member, 9 Posts

20 August 2009 at 2:41pm

HasManyFiles Ver SVN 0.3.2

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

Line 44 in /var/html/sapphire/core/model/DataObjectDecorator.php
Source

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

Trace

* DataObjectDecorator->setOwner(): Trying to decorate an object of class 'CMSMain' with 'CustomScriptInit', only Dataobject subclasses are supported.
Line 44 of DataObjectDecorator.php
* DataObjectDecorator->setOwner(CMSMain,LeftAndMain)
Line 492 of Object.php
* Object->__construct()
Line 74 of RequestHandler.php
* RequestHandler->__construct()
Line 274 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/admin/)
Line 118 of main.php

Humm.. Why i have a error?

Avatar
WebSpilka

Community Member, 89 Posts

20 August 2009 at 9:10pm

I have encountered the same problem
Who can tell how to solve it?

Avatar
bummzack

Community Member, 904 Posts

20 August 2009 at 9:36pm

Hi

The HasManyFileManager is not compatible with SilverStripe 2.3.2 (or 2.3.3 for that matter).
I think it's not worth the effort to further develop that module, since there's a much more versatile module out there: DataObjectManager (http://doc.silverstripe.com/doku.php?id=modules:dataobjectmanager)

I suggest you try out the DataObjectManager. You'll find out, that you can do the same things (and more) as you were able to do with the HasManyFileManager.
Maybe I'll write a migration script to move from HasManyFileManager to DataObjectManager (for Websites that were using HasManyFileManager and now want to upgrade to a newer version of SilverStripe)

Avatar
WebSpilka

Community Member, 89 Posts

20 August 2009 at 9:57pm

Thank you for your prompt response
I will not wait for new version
will use DataObjectManager

Avatar
UncleCheese

Forum Moderator, 4102 Posts

21 August 2009 at 1:15am

Banal, I think that's a great idea. Let me know if you need anything from me to collaborate on a migration script.