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

Files & Images broken when enabling DOM


Reply


6 Posts   1258 Views

Avatar
Carbon Crayon

Community Member, 598 Posts

14 October 2009 at 11:28pm

Edited: 14/10/2009 11:39pm

Hi Uncle Cheese

I am having a problem when enabling the DOM in Files & Images. I get the following error:

[Notice] Object of class AssetAdmin could not be converted to int
GET /admin/assets/

Line 121 in /disk1/web/vhost/intranet.dev.mpc.local/html/dataobject_manager/code/DataObjectManager.php

If I disable the DOM in Files & images it works fine.

SS v2.3.3
DOM r302
SWF r271

Thanks

Aram

Avatar
Digital-Punk.co.uk

Community Member, 51 Posts

15 October 2009 at 1:20am

Hi,

I got today exactly the same problem. Have you found any solution how to resolve this problem (I mean without disabling of DOM..)?

Kind regards
Mindaugas

Avatar
UncleCheese

Forum Moderator, 4096 Posts

15 October 2009 at 1:29am

Hmm, I do see something that looks a little off. First, make sure that line 121 of your DataObjectManager.php is this:

$this->isNested = !$this->controller instanceof SiteTree && Controller::curr()== "CMSMain";

The problem seems to be that Controller::curr() returns an object, not a string. That line is trying to compare an object to a string.

I've updated the code to read:

$this->isNested = !$this->controller instanceof SiteTree && Controller::curr()->class == "CMSMain";

Update your SVN and let me know if that works.

Avatar
Digital-Punk.co.uk

Community Member, 51 Posts

15 October 2009 at 2:32am

I updated DOM from SVN few minutes ago - it's works now!

kr
Mindaugas

Avatar
Carbon Crayon

Community Member, 598 Posts

15 October 2009 at 3:22am

Perfect as always UC :)

I don't think I've had a problem with the DOM that hasn't been fixed within a few hours! You should start charging for this kind of service ;)

Thanks again

Avatar
Platypus

Community Member, 43 Posts

16 October 2009 at 7:30pm

Hi UncleCheese, after updating to DOM r303 I ran into problems. When I create a new ImageGallery the Album name is not shown in the pictures tab, and after uploading images they don't show up in the pictures tab also.

After changing back line 121 in dataobjectmanager.php to

$this->isNested = !$this->controller instanceof SiteTree && Controller::curr()== "CMSMain";

everything works fine again... so this last update seems to break something?