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

nestedurls branch and dataobjectmanager


Reply

5 Posts   1550 Views

Avatar
mrt_r

15 July 2009 at 11:30pm Community Member, 9 Posts

UncleCheese,
first of all, great work on the dataobjectmanager! it's wonderuful!

I have checked out the latest version of the nested branch and dataobjectmanager and image_gallery
i can't seem to get the popup to show the formfields needed to add or edit data.
the popup stays empty.
When i use the nestedurls code in dataobjectmanager_nestedurls the whole cms just errors.
Is the nestedurls code up to date? is there a workaround to get things running?

thanks!

Avatar
UncleCheese

16 July 2009 at 12:52am 4085 Posts

No, the nestedurls code is a work in progress. I've been having a hard time getting it to work right. What do you mean the CMS "just errors?"

Avatar
mrt_r

16 July 2009 at 2:10am Community Member, 9 Posts

i get a completely blank page... no error message. i'll do some digging to find what causes it

Avatar
mrt_r

16 July 2009 at 2:16am (Last edited: 16 July 2009 2:37am), Community Member, 9 Posts

when i comment out DataObjectManager::allow_assets_override(true);
the admin loads again but the image_gallery shows an empty javascript alert...

edit: my bad - now i get:
js alert:
ERROR [Notice]: Undefined index: DataObjectManager
IN POST /admin/getitem?ID=6&locale=en_US&ajax=1
Line 149 in /Volumes/LaCie/workspace/nested/sapphire/core/ClassInfo.php

Source
======
140:    /**
141:     * @todo Improve documentation
142:     */
143:    static function ancestry($class, $onlyWithTables = false) {
144:       global $_ALL_CLASSES;
145:
146:       if(is_object($class)) $class = $class->class;
147:       else if(!is_string($class)) user_error("Bad class value " . var_export($class, true) . " passed to
ClassInfo::ancestry()", E_USER_WARNING);
148:
* 149:       $items = $_ALL_CLASSES['parents'][$class];
150:       $items[$class] = $class;
151:       if($onlyWithTables) foreach($items as $item) {
152:          if(!DataObject::has_own_table($item)) unset($items[$item]);
153:       }
154:       return $items;
155:    }

translatable doesn't work probably so i did a clean install
all i'm getting now is a
"there was an error" message on trying to edit the imagegallerypage

next up:
setpluraltitle function didn't exist on the nesturls dataobjectmanager so i added that
now i can edit the imagegallerypage again.
On adding or editing an album or image i get the empty popup again.
now i'm looking at my php log wich mentions:

HP Fatal error: Call to a member function getErrors() on a non-object in /Volumes/LaCie/workspace/nested/sapphire/forms/Form.php on line 543

Avatar
mrt_r

16 July 2009 at 3:24am (Last edited: 16 July 2009 3:30am), Community Member, 9 Posts

After patching this bug in the nestedurls branch
http://open.silverstripe.com/ticket/3814

the default dataobjectmanager code with the image_gallery seems to be working fine for a basic install.
only thing is the coverimage doesn't work:

[User Error] Uncaught Exception: Object->__call(): the method 'field' does not exist on 'DataObjectManager_ItemRequest'

and importingalready uploaded images
[User Error] Uncaught Exception: Object->__call(): the method 'backlinktracking' does not exist on 'ImageGalleryImage'

this seems to be consistent errors caused by nested urls