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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Nesting a ManyManyDataObjectManager


Go to End


11 Posts   2595 Views

Avatar
JoshuaLewis

Community Member, 81 Posts

8 November 2009 at 12:26am

I'm using Silverstripe 2.3.3, DataObjectManager r317, and SWFUpload r271 and need to extend a class of objects to include available sizes. Since each particular product will be available in multiple sizes and each size can be available to multiple products I've set them up in a many_many relation.

The problem is that I'm already interacting with the products through a ManyManyDataObjectManager in a ProductHolder page type (class name 'ProductList') and trying to nest the new ManyManyDataObjectManager inside it gives me the following error:
115 on line F:\xampp\htdocs\stinger\sapphire\core\Object.php: Cannot instantiate abstract class Object in Fatal error

What I believe to be the relevant code can be seen here : http://pastie.org/687736

Any thoughts?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

8 November 2009 at 4:43pm

Something's wrong. I'll look at your code a little more closely when I have some time.

Avatar
JoshuaLewis

Community Member, 81 Posts

9 November 2009 at 9:27pm

Thanks. I plan to transfer the site online from my localhost as soon as I take care of another couple of issues and will do a clean install and update then. Hopefully that will clear it up.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 November 2009 at 6:03am

Could you paste the rest of that error? Does it come with a trace at all?

Avatar
JoshuaLewis

Community Member, 81 Posts

10 November 2009 at 10:20am

Nope, nothing I can find but that one line. I tried turning on error logging and the same message shows up in the php log.

Avatar
JoshuaLewis

Community Member, 81 Posts

10 November 2009 at 1:47pm

I've updated the core files in my localhost install of silverstripe to the 2.4 branch to try and resolve some other problems.
http://svn.silverstripe.com/open/phpinstaller/branches/2.4

I still get the same error though when I try to nest the DOM.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 November 2009 at 3:14pm

Oh, man. Don't upgrade to the branch. That's untested. Tons of stuff is going to break. I still haven't gotten all the patches in for the trunk, let alone the branches.

Avatar
JoshuaLewis

Community Member, 81 Posts

10 November 2009 at 3:24pm

Noted, I'll revert my working copy. At least the other problems the update was meant to fix aren't critical. I'll try doing some experiments to see if I can track down the source of the DOM problem.

Go to Top