Jump to:

7938 Posts in 1541 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Issue with 2.3.6 and FileDataObjectManager

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: 1000 Views
  • paul.mcilwaine
    Avatar
    Community Member
    21 Posts

    Issue with 2.3.6 and FileDataObjectManager Link to this post

    Im running into a bit of an issue with the FileDataObjectManager (can't confirm if this is an issue with the ImageDataObjectManager) however when adding a new file and click upload Im getting "An error uploading a file" javascript error message. I than check out the assets directory (file system) and the file has been uploaded (directory too), it also appears in the database.

    The code I am using is

    $f->addFieldToTab( "Root.Content.ProjectFiles", $item = new FileDataObjectManager(
             $this,
             "ProjectItem",
             "ProjectItem",
             "File",
             array(),
             "getCMSFields",
             "",
             "SortOrder ASC"
          ) );
          
          $item->setUploadFolder( sprintf( "projects/%s", str_replace( " ", "-", $this->Title ) ) );

    Another thing I have noticed to when using v2.3.6 of SS (r388 dom) is that the assets file listing is now broken.

    ERROR [Warning]: Missing argument 3 for ComplexTableField_Item::__construct(), called in /path/to/public_html/projectname/dataobject_manager/code/DataObjectManager.php on line 584 and defined
    IN POST /admin/assets/getitem?ID=85&ajax=1

  • Pigeon
    Avatar
    Community Member
    243 Posts

    Re: Issue with 2.3.6 and FileDataObjectManager Link to this post

    DOM for 2.3 is now on its own tag: http://carlinowebdesign.svn.beanstalkapp.com/modules/branches/2.3/dataobject_manager

    the main branch is 2.4 only now.

  • paul.mcilwaine
    Avatar
    Community Member
    21 Posts

    Re: Issue with 2.3.6 and FileDataObjectManager Link to this post

    Ive updated to this revision now, but still get similar issues with uploading although it should be noted it did fix the Files & Assets issue. Has this got more to do with the swfupload module which I haven't updated in sometime mainly because I don't recall any updates to it.

  • paul.mcilwaine
    Avatar
    Community Member
    21 Posts

    Re: Issue with 2.3.6 and FileDataObjectManager Link to this post

    Ive also moved to 2.3.5 SS and DOM r335 and its still a problem which makes me think Ive done something wrong in regards to the code Im using however its no different to others Ive implemented.

  • paul.mcilwaine
    Avatar
    Community Member
    21 Posts

    Re: Issue with 2.3.6 and FileDataObjectManager Link to this post

    Please ignore, there was a typo in the DataObject has_one linking back to the Page Object.

    1000 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.