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

Error trying to use file & Images


Reply


5 Posts   1444 Views

Avatar
Capiz

Community Member, 11 Posts

23 March 2010 at 8:47am

[Warning] Missing argument 3 for ComplexTableField_Item::__construct(), called in C:\xampp\htdocs\dataobject_manager\code\DataObjectManager.php on line 584 and defined
GET /admin/assets/

Line 980 in C:\xampp\htdocs\sapphire\forms\ComplexTableField.php
Source

971 * @package forms
972 * @subpackage fields-relational
973 */
974 class ComplexTableField_Item extends TableListField_Item {
975    /**
976     * Needed to transfer pagination-status from overview.
977     */
978    protected $start;
979
980    function __construct(DataObject $item, ComplexTableField $parent, $start) {
981       $this->start = $start;
982
983       parent::__construct($item, $parent);
984    }
985
986    function Link() {

Trace

* ComplexTableField_Item->__construct(Image,AssetManager)
Line 584 of DataObjectManager.php
* DataObjectManager_Item->__construct(Image,AssetManager)
Line 651 of FileDataObjectManager.php
* FileDataObjectManager_Item->__construct(Image,AssetManager,0)
* ReflectionClass->newInstanceArgs(Array)
Line 90 of Object.php
* Object::create(FileDataObjectManager_Item,Image,AssetManager,0)
Line 289 of ComplexTableField.php
* ComplexTableField->Items()
* call_user_func_array(Array,Array)
Line 550 of ViewableData.php
* ViewableData->cachedCall(Items,,)
Line 591 of ViewableData.php
* ViewableData->hasValue(Items)
Line 401 of .cacheC..xampp.htdocs.dataobject_manager.templates.FileDataObjectManager.ss
* include(C:\WINDOWS\Temp\silverstripe-cacheC--xampp-htdocs\.cacheC..xampp.htdocs.dataobject_manager.templates.FileDataObjectManager.ss)
Line 357 of SSViewer.php
* SSViewer->process(AssetManager)
Line 773 of ViewableData.php
* ViewableData->renderWith(FileDataObjectManager)
Line 267 of ComplexTableField.php
* ComplexTableField->FieldHolder()
Line 259 of DataObjectManager.php
* DataObjectManager->FieldHolder()
Line 34 of AssetManager.php
* AssetManager->FieldHolder()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(FieldHolder,,1)
Line 74 of .cacheC..xampp.htdocs.sapphire.templates.TabSetFieldHolder.ss
* include(C:\WINDOWS\Temp\silverstripe-cacheC--xampp-htdocs\.cacheC..xampp.htdocs.sapphire.templates.TabSetFieldHolder.ss)
Line 357 of SSViewer.php
* SSViewer->process(TabSet)
Line 773 of ViewableData.php
* ViewableData->renderWith(TabSetFieldHolder)
Line 62 of TabSet.php
* TabSet->FieldHolder()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(FieldHolder,,1)
Line 70 of .cacheC..xampp.htdocs.sapphire.templates.Includes.Form.ss
* include(C:\WINDOWS\Temp\silverstripe-cacheC--xampp-htdocs\.cacheC..xampp.htdocs.sapphire.templates.Includes.Form.ss)
Line 357 of SSViewer.php
* SSViewer->process(Form)
Line 773 of ViewableData.php
* ViewableData->renderWith(Array)
Line 982 of Form.php
* Form->forTemplate()
Line 424 of ViewableData.php
* ViewableData->XML_val(EditForm,,1)
Line 983 of ViewableData.php
* ViewableData_Customised->XML_val(EditForm,,1)
Line 34 of .cacheC..xampp.htdocs.cms.templates.Includes.AssetAdmin_right.ss
* include(C:\WINDOWS\Temp\silverstripe-cacheC--xampp-htdocs\.cacheC..xampp.htdocs.cms.templates.Includes.AssetAdmin_right.ss)
Line 357 of SSViewer.php
* SSViewer->process(ViewableData_Customised)
Line 773 of ViewableData.php
* ViewableData->renderWith(Array)
Line 452 of LeftAndMain.php
* LeftAndMain->Right()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(Right,,1)
Line 983 of ViewableData.php
* ViewableData_Customised->XML_val(Right,,1)
Line 71 of .cacheC..xampp.htdocs.cms.templates.LeftAndMain.ss
* include(C:\WINDOWS\Temp\silverstripe-cacheC--xampp-htdocs\.cacheC..xampp.htdocs.cms.templates.LeftAndMain.ss)
Line 357 of SSViewer.php
* SSViewer->process(ViewableData_Customised)
Line 163 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 119 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 280 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/admin/assets/)
Line 118 of main.php

What have i done wrong ?

I have installed the latest DataObjectManger and SWFUpload module.

I have tried with the earlier SWFUpload module, but then i get a different error, saying that DataObjectManger needs SWFUpload module to run.

Hope someone can help me :-S

Avatar
UncleCheese

Forum Moderator, 4094 Posts

23 March 2010 at 8:53am

If you're running 2.3, you need to switch off the trunk and on to the 2.3 branch.

Avatar
Capiz

Community Member, 11 Posts

23 March 2010 at 9:17am

Hello

Will you please link to the specific files?

Im not sure what Trunk is, but Will you please inform me?

Regards
Rasmus
Denmark

Avatar
Capiz

Community Member, 11 Posts

24 March 2010 at 8:21am

http://www.silverstripe.org/dataobjectmanager-module-forum/show/260372

This solution did the job - edit the filetype to js - instead of the .js.txt - so easy, and working great :-)

Can you ad folders, instead of having 200 pictures at the startpage of the gallery?

Regards
Rasmus

Avatar
caibee

Community Member, 1 Post

26 March 2010 at 5:21pm

I have a similar issue. I installed the dataObjectManager module, the swfupload module and image gallery module (with a dev/build and flush after each one), and it wouldn't show the image files in my upload folder when I tried to add them to a gallery in the content area. Then when I clicked on the files & images tab I got the error which I ahve cut and pasted below this question.

So I deleted (dev/built & flushed) them all and installed them one at a time, and tried to get into the files & images tab after each one - the error happened after the install of swfupload module. I checked my .js files and they don't have .txt after them. I don't know what you mean by Trunk either, sorry. I'm totally lost now. I have Silverstripe v2.3.7 and swfupload3 from http://www.carlinowebdesign.com/silverstripe-extensions. Thanks for any help, I'm a bit of a noob, sorry.

ERROR:
[Warning] Missing argument 3 for ComplexTableField_Item::__construct(), called in C:\xampplite\htdocs\rotoitiSchool\dataobject_manager\code\DataObjectManager.php on line 584 and defined
GET /rotoitiSchool/admin/assets/
Line 980 in C:\xampplite\htdocs\rotoitiSchool\sapphire\forms\ComplexTableField.php

Source
971 * @package forms
972 * @subpackage fields-relational
973 */
974 class ComplexTableField_Item extends TableListField_Item {
975    /**
976     * Needed to transfer pagination-status from overview.
977     */
978    protected $start;
979
980    function __construct(DataObject $item, ComplexTableField $parent, $start) {
981       $this->start = $start;
982
983       parent::__construct($item, $parent);
984    }
985
986    function Link() {
Trace
ComplexTableField_Item->__construct(Image,AssetManager)
Line 584 of DataObjectManager.php
DataObjectManager_Item->__construct(Image,AssetManager)
Line 651 of FileDataObjectManager.php
FileDataObjectManager_Item->__construct(Image,AssetManager,0)

ReflectionClass->newInstanceArgs(Array)
Line 90 of Object.php
Object::create(FileDataObjectManager_Item,Image,AssetManager,0)
Line 289 of ComplexTableField.php
ComplexTableField->Items()

call_user_func_array(Array,Array)
Line 550 of ViewableData.php
ViewableData->cachedCall(Items,,)
Line 591 of ViewableData.php
ViewableData->hasValue(Items)
Line 401 of .cacheC..xampplite.htdocs.rotoitiSchool.dataobject_manager.templates.FileDataObjectManager.ss
include(C:\Documents and Settings\Lindsay & Cheril\Local Settings\Temp\silverstripe-cacheC--xampplite-htdocs-rotoitiSchool\.cacheC..xampplite.htdocs.rotoitiSchool.dataobject_manager.templates.FileDataObjectManager.ss)
Line 357 of SSViewer.php
SSViewer->process(AssetManager)
Line 773 of ViewableData.php
ViewableData->renderWith(FileDataObjectManager)
Line 267 of ComplexTableField.php
ComplexTableField->FieldHolder()
Line 259 of DataObjectManager.php
DataObjectManager->FieldHolder()
Line 34 of AssetManager.php
AssetManager->FieldHolder()

call_user_func_array(Array,Array)
Line 408 of ViewableData.php
ViewableData->XML_val(FieldHolder,,1)
Line 74 of .cacheC..xampplite.htdocs.rotoitiSchool.sapphire.templates.TabSetFieldHolder.ss
include(C:\Documents and Settings\Lindsay & Cheril\Local Settings\Temp\silverstripe-cacheC--xampplite-htdocs-rotoitiSchool\.cacheC..xampplite.htdocs.rotoitiSchool.sapphire.templates.TabSetFieldHolder.ss)
Line 357 of SSViewer.php
SSViewer->process(TabSet)
Line 773 of ViewableData.php
ViewableData->renderWith(TabSetFieldHolder)
Line 62 of TabSet.php
TabSet->FieldHolder()

call_user_func_array(Array,Array)
Line 408 of ViewableData.php
ViewableData->XML_val(FieldHolder,,1)
Line 70 of .cacheC..xampplite.htdocs.rotoitiSchool.sapphire.templates.Includes.Form.ss
include(C:\Documents and Settings\Lindsay & Cheril\Local Settings\Temp\silverstripe-cacheC--xampplite-htdocs-rotoitiSchool\.cacheC..xampplite.htdocs.rotoitiSchool.sapphire.templates.Includes.Form.ss)
Line 357 of SSViewer.php
SSViewer->process(Form)
Line 773 of ViewableData.php
ViewableData->renderWith(Array)
Line 982 of Form.php
Form->forTemplate()
Line 424 of ViewableData.php
ViewableData->XML_val(EditForm,,1)
Line 983 of ViewableData.php
ViewableData_Customised->XML_val(EditForm,,1)
Line 34 of .cacheC..xampplite.htdocs.rotoitiSchool.cms.templates.Includes.AssetAdmin_right.ss
include(C:\Documents and Settings\Lindsay & Cheril\Local Settings\Temp\silverstripe-cacheC--xampplite-htdocs-rotoitiSchool\.cacheC..xampplite.htdocs.rotoitiSchool.cms.templates.Includes.AssetAdmin_right.ss)
Line 357 of SSViewer.php
SSViewer->process(ViewableData_Customised)
Line 773 of ViewableData.php
ViewableData->renderWith(Array)
Line 452 of LeftAndMain.php
LeftAndMain->Right()

call_user_func_array(Array,Array)
Line 408 of ViewableData.php
ViewableData->XML_val(Right,,1)
Line 983 of ViewableData.php
ViewableData_Customised->XML_val(Right,,1)
Line 71 of .cacheC..xampplite.htdocs.rotoitiSchool.cms.templates.LeftAndMain.ss
include(C:\Documents and Settings\Lindsay & Cheril\Local Settings\Temp\silverstripe-cacheC--xampplite-htdocs-rotoitiSchool\.cacheC..xampplite.htdocs.rotoitiSchool.cms.templates.LeftAndMain.ss)
Line 357 of SSViewer.php
SSViewer->process(ViewableData_Customised)
Line 163 of Controller.php
Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
RequestHandler->handleRequest(HTTPRequest)
Line 119 of Controller.php
Controller->handleRequest(HTTPRequest)
Line 280 of Director.php
Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
Director::direct(/admin/assets/)
Line 118 of main.php