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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Missing argument 3 for FileDataObjectManager_Item::__construct()


Reply


6 Posts   1565 Views

Avatar
Andrew Houle

Community Member, 132 Posts

22 April 2010 at 1:29am

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?

Avatar
UncleCheese

Forum Moderator, 4094 Posts

22 April 2010 at 1:53am

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.

Avatar
Andrew Houle

Community Member, 132 Posts

22 April 2010 at 2:00am

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!

Avatar
Matty Balaam

Community Member, 69 Posts

28 May 2010 at 2:57am

Edited: 28/05/2010 3:01am

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

Avatar
slith

Community Member, 7 Posts

11 August 2010 at 2:18pm

Edited: 11/08/2010 2:24pm

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

Avatar
UncleCheese

Forum Moderator, 4094 Posts

12 August 2010 at 1:37am

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