7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » ** 2.4 Compatibility Patch is in **
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 3870 Views |
-
Re: ** 2.4 Compatibility Patch is in **

17 March 2010 at 7:48am
I keep getting this error
ERROR [Warning]: Missing argument 3 for DataObjectManager_Item::__construct(), called in C:\Webserver\contentaward2010\sapphire\forms\ComplexTableField.php on line 297 and defined
IN POST /admin/getitem?ID=10&locale=de_DE&ajax=1
Line 582 in C:\Webserver\contentaward2010\dataobject_manager\code\DataObjectManager.phpSource
======
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);Trace
=====
<ul>DataObjectManager_Item->__construct(Absatz,DataObjectManager)
line 297 of ComplexTableField.phpComplexTableField->Items()
line 367 of ViewableData.phpViewableData->obj(Items,,,1,)
line 409 of ViewableData.phpViewableData->cachedCall(Items,)
line 422 of ViewableData.phpViewableData->hasValue(Items)
line 348 of .cacheC..Webserver.contentaward2010.dataobject_manager.templates.DataObjectManager.ssinclude(C:\Dokumente und Einstellungen\philipp\Lokale Einstellungen\Temp\silverstripe-cacheC--Webserver-contentaward2010\.cacheC..Webserver.contentaward2010.dataobject_manager.templates.DataObjectManager.ss)
line 377 of SSViewer.phpSSViewer->process(DataObjectManager)
line 340 of ViewableData.phpViewableData->renderWith(DataObjectManager)
line 275 of ComplexTableField.phpComplexTableField->FieldHolder()
line 259 of DataObjectManager.phpDataObjectManager->FieldHolder()
line 367 of ViewableData.phpViewableData->obj(FieldHolder,,,1)
line 443 of ViewableData.phpViewableData->XML_val(FieldHolder,,1)
line 73 of .cacheC..Webserver.contentaward2010.sapphire.templates.TabSetFieldHolder.ssinclude(C:\Dokumente und Einstellungen\philipp\Lokale Einstellungen\Temp\silverstripe-cacheC--Webserver-contentaward2010\.cacheC..Webserver.contentaward2010.sapphire.templates.TabSetFieldHolder.ss)
line 377 of SSViewer.phpSSViewer->process(TabSet)
line 340 of ViewableData.phpViewableData->renderWith(TabSetFieldHolder)
line 61 of TabSet.phpTabSet->FieldHolder()
line 367 of ViewableData.phpViewableData->obj(FieldHolder,,,1)
line 443 of ViewableData.phpViewableData->XML_val(FieldHolder,,1)
line 58 of .cacheC..Webserver.contentaward2010.sapphire.templates.TabSetFieldHolder.ssinclude(C:\Dokumente und Einstellungen\philipp\Lokale Einstellungen\Temp\silverstripe-cacheC--Webserver-contentaward2010\.cacheC..Webserver.contentaward2010.sapphire.templates.TabSetFieldHolder.ss)
line 377 of SSViewer.phpSSViewer->process(TabSet)
line 340 of ViewableData.phpViewableData->renderWith(TabSetFieldHolder)
line 61 of TabSet.phpTabSet->FieldHolder()
line 367 of ViewableData.phpViewableData->obj(FieldHolder,,,1)
line 443 of ViewableData.phpViewableData->XML_val(FieldHolder,,1)
line 77 of .cacheC..Webserver.contentaward2010.sapphire.templates.Includes.Form.ssinclude(C:\Dokumente und Einstellungen\philipp\Lokale Einstellungen\Temp\silverstripe-cacheC--Webserver-contentaward2010\.cacheC..Webserver.contentaward2010.sapphire.templates.Includes.Form.ss)
line 377 of SSViewer.phpSSViewer->process(Form)
line 340 of ViewableData.phpViewableData->renderWith(Array)
line 1077 of Form.phpForm->forTemplate()
line 1104 of Form.phpForm->formHtmlContent()
line 376 of LeftAndMain.phpLeftAndMain->getitem(SS_HTTPRequest)
line 193 of Controller.phpController->handleAction(SS_HTTPRequest)
line 134 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.phpController->handleRequest(SS_HTTPRequest)
line 283 of Director.phpDirector::handleRequest(SS_HTTPRequest,Session)
line 127 of Director.phpDirector::direct(/admin/getitem)
line 127 of main.php</ul>
As a quick hack I did the following:
Index: DataObjectManager.php
===================================================================
--- DataObjectManager.php (revision 377)
+++ DataObjectManager.php (working copy)
@@ -579,9 +579,11 @@
}class DataObjectManager_Item extends ComplexTableField_Item {
- function __construct(DataObject $item, DataObjectManager $parent, $start)
+ //function __construct(DataObject $item, DataObjectManager $parent, $start)
+ function __construct(DataObject $item, DataObjectManager $parent)
{
- parent::__construct($item, $parent, $start);
+ //parent::__construct($item, $parent, $start);
+ parent::__construct($item, $parent);
}
function Link() {
Index: FileDataObjectManager.php
===================================================================
--- FileDataObjectManager.php (revision 377)
+++ FileDataObjectManager.php (working copy)
@@ -645,9 +645,11 @@
}class FileDataObjectManager_Item extends DataObjectManager_Item {
- function __construct(DataObject $item, ComplexTableField $parent, $start)
+ //function __construct(DataObject $item, ComplexTableField $parent, $start)
+ function __construct(DataObject $item, ComplexTableField $parent)
{
- parent::__construct($item, $parent, $start);
+ //parent::__construct($item, $parent, $start);
+ parent::__construct($item, $parent);
}
public function IsFile()dataobject_manager: 377
sapphire: 101143
browser: firefox 3.6 -
Re: ** 2.4 Compatibility Patch is in **

17 March 2010 at 8:17am
Interesting that no one else, including myself has gotten that error. Is there a specific set of actions that causes it?
-
Re: ** 2.4 Compatibility Patch is in **

17 March 2010 at 10:27am
Are you using SilverStripe trunk or beta1? I'm on trunk.
An API change led to a change in /sapphire/forms/ComplexTableField.php in revision 98543 from
$output->push(Object::create($this->itemClass,$item, $this));
to$output->push(new $this->itemClass($item, $this));
I guess my change is not very sensible, only a quick fix which seems to work (at least for me).
-
Re: ** 2.4 Compatibility Patch is in **

17 March 2010 at 10:53am
Actually, now that I look at it, that change is meaningless. Those two lines of code do exactly the same thing.
-
Re: ** 2.4 Compatibility Patch is in **

18 March 2010 at 8:41pm
Thx for the update .... I've tested in 2.4 beta and all works except the pretty photo (javascript doesn't load so opens photo on its own in window).
I just updated another 'test site' to 2.4 beta 2 and am now getting the same error that xeraa has reported above ... so I'll do the hack around until someone comes up with a better solution
I get the error when adding a image gallery page, and also when I did the upgrade (from beta to beta 2) with image gallery pages already created. Could rebuild the db fine, just couldn't access the admin area due to error. The gallery page showed but when clicking on an image it wouldn't go past the loading bar.
Hope this helps
Let me know if you need more info. -
Re: ** 2.4 Compatibility Patch is in **

18 March 2010 at 9:26pm
Also found another bit further in the code ....
ERROR [Warning]: Missing argument 3 for ImageDataObjectManager_Item::__construct(), called in D:\VertrigoServ\www\ss24\sapphire\forms\ComplexTableField.php on line 297 and defined
IN POST /ss24/admin/getitem?ID=21&ajax=1
Line 58 in D:\VertrigoServ\www\ss24\dataobject_manager\code\ImageDataObjectManager.phpSource
======
49: return floor(($this->SliderPercentage()/100) * self::$sliderWidth) - (.17 *
$this->SliderPercentage()); // handle is 16px wide
50: }
51:
52:
53: }
54:
55: class ImageDataObjectManager_Item extends FileDataObjectManager_Item
56: {
57:
* 58: function __construct(DataObject $item, ComplexTableField $parent, $start)
59: {
60: parent::__construct($item, $parent, $start);
61: }
62:
63: public function FileIcon()
64: {
| 3870 Views | ||
| Go to Top | Next > |



