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

Bug Reports


Reply

297 Posts   49642 Views

Avatar
Mat Weir

1 June 2010 at 2:20pm Community Member, 33 Posts

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

Avatar
UncleCheese

1 June 2010 at 3:14pm 4085 Posts

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

Avatar
Mat Weir

1 June 2010 at 3:41pm Community Member, 33 Posts

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.

Avatar
UncleCheese

1 June 2010 at 3:48pm 4085 Posts

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

Avatar
Mat Weir

1 June 2010 at 3:54pm Community Member, 33 Posts

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

Avatar
socks

7 June 2010 at 3:44pm Community Member, 190 Posts

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

Avatar
UncleCheese

7 June 2010 at 4:52pm 4085 Posts

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.

Avatar
socks

8 June 2010 at 1:26pm Community Member, 190 Posts

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.