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   49689 Views

Avatar
UncleCheese

16 October 2009 at 1:05am 4085 Posts

Hmm.. new to me. I'll do some testing.

Avatar
MarcusDalgren

16 October 2009 at 11:38pm Community Member, 288 Posts

Hello.

I was setting up and testing a DataObjectManager today and noticed an inconsistency.
When I set up a HasOneDataObjectManager with only the allowed action of show the plural title is not put in an h3-tag.

If use the base DataObjectManager it ends up in an h3-tag inside the dataobjectmanager-actions-div.

My code looks like this

$blogCategoryManager = new HasOneDataObjectManager(
$this,
"BlogHolder",
"BlogHolder",
array('Title' => 'Bloggkategori')
);
$blogCategoryManager->setPermissions(array("show"));
$blogCategoryManager->setPluralTitle('Bloggkategorier');

Everything still works so it isn't anything critical but getting that h3-tag in there would make it look alot nicer.

Avatar
MarcusDalgren

17 October 2009 at 1:46am Community Member, 288 Posts

Hey it's me again.

I just wanted to report that the HasOneDataObjectManager doesn't work as a nested dataobjectmanager. When using the normal DataObjectManager everything works but when I switch to one of the specialised DataObjectManagers like the HasOne the nested popup doesn't work. Instead the fields for the dataobject opens in the same popup and when I press close everything gets closed.

I would really need to get this fixed pretty quickly and I'm willing to pay for it if you have a busy schedule or just want som extra money ;P. Just let me know how much you want for it and we can work something out.

Avatar
UncleCheese

17 October 2009 at 2:08am 4085 Posts

NestedDOM is still fairly immature and I haven't tested it with RelationDOMs yet. If you need it quickly, you're going to have to commission the work. Please contact me through my web site http://www.carlinowebdesign.com and we can discuss it through email. Thanks.

Avatar
MarcusDalgren

17 October 2009 at 2:20am Community Member, 288 Posts

Sent you a message through your website. Thanks.

Avatar
socks

18 October 2009 at 1:37pm Community Member, 190 Posts

Localhost
Mac OS X (leopard)
MAMP
DataObjectManager r305
SWFUpload r271

Files & Images > Add files to ... > Import from an existing folder

When I hit Import, I get an error almost identical to this one http://silverstripe.org/all-other-modules/show/268998.

The transfer of the file from one folder to another does work, it just gives the warning in the pop-up window.

[Warning] ViewableData_Customised::obj() 'DetailForm' was requested from the array data as an object but it's not an object. I can't cast it.
POST /golden/admin/assets/EditForm/field/Files/ImportForm?ctf[Files][start]=0&ctf[Files][per_page]=10&ctf[Files][showall]=0&ctf[Files][sort]=SortOrder&ctf[Files][sort_dir]=DESC&ctf[Files][search]=&ctf[Files][filter]=&ctf[Files][view]=
Line 990 in /Users/cp/Sites/golden/sapphire/core/ViewableData.php
Source
981          return $val;
982       } else {
983          return $this->obj->XML_val($fieldName, $args, $cache);
984       }
985    }
986    
987    function obj($fieldName, $args = null, $forceReturnObject = false) {
988       if(isset($this->extraData[$fieldName])) {
989          if(!is_object($this->extraData[$fieldName])) {
990             user_error("ViewableData_Customised::obj() '$fieldName' was requested from the array data as an object but it's not an object. I can't cast it.", E_USER_WARNING);
991          }
992          return $this->extraData[$fieldName];
993       } else {
994          return $this->obj->obj($fieldName, $args, $forceReturnObject);
995       }
996    }
Trace
   â€¢   ViewableData_Customised::obj() 'DetailForm' was requested from the array data as an object but it's not an object. I can't cast it. 
Line 990 of ViewableData.php
   â€¢   ViewableData_Customised->obj(DetailForm,,1) 
Line 35 of .cache.Users.cp.Sites.golden.dataobject_manager.templates.DataObjectManager_popup.ss
   â€¢   include(/private/var/folders/pJ/pJmNRoVGGMqhGVxN0Pbuj++++TI/-Tmp-/silverstripe-cache-Users-cp-Sites-golden/.cache.Users.cp.Sites.golden.dataobject_manager.templates.DataObjectManager_popup.ss) 
Line 354 of SSViewer.php
   â€¢   SSViewer->process(ViewableData_Customised) 
Line 773 of ViewableData.php
   â€¢   ViewableData->renderWith(DataObjectManager_popup) 
Line 548 of FileDataObjectManager.php
   â€¢   FileDataObjectManager->saveImportForm(Array,Form,HTTPRequest) 
Line 241 of Form.php
   â€¢   Form->httpSubmission(HTTPRequest) 
Line 129 of RequestHandler.php
   â€¢   RequestHandler->handleRequest(HTTPRequest) 
Line 143 of RequestHandler.php
   â€¢   RequestHandler->handleRequest(HTTPRequest) 
Line 143 of RequestHandler.php
   â€¢   RequestHandler->handleRequest(HTTPRequest) 
Line 143 of RequestHandler.php
   â€¢   RequestHandler->handleRequest(HTTPRequest) 
Line 122 of Controller.php
   â€¢   Controller->handleRequest(HTTPRequest) 
Line 277 of Director.php
   â€¢   Director::handleRequest(HTTPRequest,Session) 
Line 121 of Director.php
   â€¢   Director::direct(/admin/assets/EditForm/field/Files/ImportForm) 
Line 118 of main.php

Avatar
UncleCheese

18 October 2009 at 5:14pm 4085 Posts

r306 should fix that.

Avatar
socks

18 October 2009 at 5:57pm Community Member, 190 Posts

Sounds good. Thanks.