Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Missing argument 3 for FileDataObjectManager_Item::__construct()

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1515 Views
  • Andrew Houle
    Avatar
    Community Member
    132 Posts

    Missing argument 3 for FileDataObjectManager_Item::__construct() Link to this post

    I'm getting this error with the data object manager...

    [Warning] Missing argument 3 for DataObjectManager_Item::__construct(), called in /Applications/MAMP/htdocs/library/sapphire/forms/ComplexTableField.php on line 297 and defined
    GET /library/admin/EditForm/field/SidebarExtras/item/9/edit

    Line 581 in /Applications/MAMP/htdocs/library/dataobject_manager/code/DataObjectManager.php
    Source

    572    {
    573     return $this->getSetting('confirmDelete');
    574    }
    575    
    576    
    577
    578 }
    579
    580 class DataObjectManager_Item extends ComplexTableField_Item {
    581    function __construct(DataObject $item, DataObjectManager $parent, $start)
    582    {
    583       parent::__construct($item, $parent, $start);
    584    }

    I'm on DOM rev 394 and SS 2.4rc1. Anyone else run into this issue?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Missing argument 3 for FileDataObjectManager_Item::__construct() Link to this post

    Something is seriously screwed up. My r394 doesn't look like that.

    Line 581, DataObjectManager.php

    class DataObjectManager_Item extends ComplexTableField_Item {
       function __construct(DataObject $item, DataObjectManager $parent)
       {
          parent::__construct($item, $parent);
       }

    You sure you're not on the 2.3 branch? I searched my entire working copy for the code in your error, and it's definitely not there.

  • Andrew Houle
    Avatar
    Community Member
    132 Posts

    Re: Missing argument 3 for FileDataObjectManager_Item::__construct() Link to this post

    Sorry man, I got too many copies of the same site I'm working on. Forgot to change the url from library to libary2. It works fine on 394 when I type in the right url!

  • Matty Balaam
    Avatar
    Community Member
    69 Posts

    Re: Missing argument 3 for FileDataObjectManager_Item::__construct() Link to this post

    EDIT: Just realised I was working with the 2.3 branch of DataObjectManager. What a great first post!

    ------------------------------------------------------------------------------------

    I'm updating to SS 2.4 and getting a similar problem using Image Gallery 398. Is it supposed to work with 2.4?

    I get a slightly different message:

    ERROR [Warning]: Missing argument 3 for DataObjectManager_Item::__construct(), called in /Users/matthewbalaam/Sites/Madeline/sapphire/forms/ComplexTableField.php on line 297 and defined
    IN POST /madeline/admin/getitem?ID=13&ajax=1
    Line 582 in /Users/matthewbalaam/Sites/Madeline/dataobject_manager/code/DataObjectManager.php

    Source
    ======
    573:    {
    574:     return $this->getSetting('confirmDelete');
    575:    }
    576:    
    577:    
    578:
    579: }
    580:
    581: class DataObjectManager_Item extends ComplexTableField_Item {
    * 582:    function __construct(DataObject $item, DataObjectManager $parent, $start)
    583:    {
    584:       parent::__construct($item, $parent, $start);
    585:    }
    586:    
    587:    function Link() {
    588: return Controller::join_links($this->parent->BaseLink(), '/item/' . $this->item->ID);

    Thanks

  • slith
    Avatar
    Community Member
    7 Posts

    Re: Missing argument 3 for FileDataObjectManager_Item::__construct() Link to this post

    Matty, i got around this error by installing the latest Dataobject Manager trunk build. I got it to work with Revision: #414

    http://www.silverstripe.org/dataobjectmanager-module/

    download: http://www.silverstripe.org/assets/modules/trunk/modules-dataobject_manager-r414.tar.gz

  • UncleCheese
    Avatar
    4085 Posts

    Re: Missing argument 3 for FileDataObjectManager_Item::__construct() Link to this post

    Yeah, that's the error you get if you're running DOM 2.3 on SS 2.4.

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