Jump to:

7937 Posts in 1537 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Bug Reports

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Go to End
Author Topic: 47957 Views
  • Mat Weir
    Avatar
    Community Member
    33 Posts

    Re: Bug Reports Link to this post

    Hi UncleCheese,

    I am using ImageDataObjectManager from trunk with SS 2.4. I have a Photo object that extends Image.

    The manager is defined in Category.php as:

    $manager = new ImageDataObjectManager(
    $this,
    'Photos',
    'Photo',
    null,
    array('Title' => 'Title', 'Description' => 'Description', 'DateTaken' => 'DateTaken'),
    'getCMSFields_forPopup');

    I have a problem where OwnerID isn't being set on the File object. It seems that Member::currentUserID() is returning 0 in line 623 of FileDataObjectManager.php. This is strange, because of echo Member::currentUserID() from the CategoryController, it returns 1.

    Have you experienced this problem with the latest versions?

    Cheers,

    Mat Weir

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    ImageDOM manages DataObjects that contain images. Not images or subclasses thereof. Try ImageAssetManager.

  • Mat Weir
    Avatar
    Community Member
    33 Posts

    Re: Bug Reports Link to this post

    Thanks UncleCheese but I have the same problem with ImageAssetManager:

    $manager = new ImageAssetManager(
       $this,
       'Photos',
       'Photo',
       array('Title' => 'Title', 'Description' => 'Description', 'DateTaken' => 'DateTaken')
    );


    OwnerID is set to 0 even though I'm logged in.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    Does your Image subclass have a has_one relation to the page?

  • Mat Weir
    Avatar
    Community Member
    33 Posts

    Re: Bug Reports Link to this post

    Yes, and everything is working except OwnerID being set in the File table. Images are uploading and showing correctly related to the page.

  • socks
    Avatar
    Community Member
    190 Posts

    Re: Bug Reports Link to this post

    SS 2.3.6
    SWFUpload r369 (I tried r375 too but that didn't seem to fix the issue)

    This line in the swfupload/_config doesn't seem to be pulling from my php.ini and gives me a 20MB max upload warning:

    'file_size_limit' => str_replace("M","MB",ini_get('upload_max_filesize')),

    I did change swfupload/_config to this, which works, but would be nice if the other way worked too:

    'file_size_limit' => '80MB',

    Thank you

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    What do you mean it's not pulling from php.ini? What value is being returned? Keep in mind that with most PHP configurations, it is not possible to modify upload_max_filesize with ini_set() or with htaccess directives.

  • socks
    Avatar
    Community Member
    190 Posts

    Re: Bug Reports Link to this post

    Well, in the past, using things like Slide Show Pro (on different host), I often had to upload a php.ini file to override the upload_max_filesize & post_max_size settings. It looks like the 20M value it's returning is the hosts default limit. So I guess my php.ini isn't really overriding.

    Sorry for the false alarm.

    47957 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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.