7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Files & Images broken when enabling DOM
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 987 Views |
-
Files & Images broken when enabling DOM

14 October 2009 at 11:28pm Last edited: 14 October 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 r271Thanks
Aram
-
Re: Files & Images broken when enabling DOM

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 -
Re: Files & Images broken when enabling DOM

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.
-
Re: Files & Images broken when enabling DOM

15 October 2009 at 2:32am
I updated DOM from SVN few minutes ago - it's works now!
kr
Mindaugas -
Re: Files & Images broken when enabling DOM

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
-
Re: Files & Images broken when enabling DOM

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?
| 987 Views | ||
|
Page:
1
|
Go to Top |



