Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Nesting a ManyManyDataObjectManager

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 1616 Views
  • JoshuaLewis
    Avatar
    Community Member
    76 Posts

    Nesting a ManyManyDataObjectManager Link to this post

    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?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Nesting a ManyManyDataObjectManager Link to this post

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

  • JoshuaLewis
    Avatar
    Community Member
    76 Posts

    Re: Nesting a ManyManyDataObjectManager Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Nesting a ManyManyDataObjectManager Link to this post

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

  • JoshuaLewis
    Avatar
    Community Member
    76 Posts

    Re: Nesting a ManyManyDataObjectManager Link to this post

    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.

  • JoshuaLewis
    Avatar
    Community Member
    76 Posts

    Re: Nesting a ManyManyDataObjectManager Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Nesting a ManyManyDataObjectManager Link to this post

    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.

  • JoshuaLewis
    Avatar
    Community Member
    76 Posts

    Re: Nesting a ManyManyDataObjectManager Link to this post

    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.

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