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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

get_static not found!!!


Go to End


2 Posts   1211 Views

Avatar
Roony

Community Member, 14 Posts

29 July 2010 at 2:08am

Can anybody please help me out. I cant seem to create new article pages without getting this error.

ERROR [User Error]: Object::__call() Method 'get_static' not found in class 'FileDataObjectManager'
IN POST /admin/getitem?ID=23&ajax=1
Line 133 in /home/.margara/riotsociety/riotsociety.com.au/sapphire/core/Object.php

Source
======
124:
125: } else if($config['function_str']) {
126: $function = Object::$extraMethods[$this->class][strtolower($methodName)]['function'] =
create_function('$obj, $args', $config['function_str']);
127: return $function($this, $args);
128:
129: } else {
130: user_error("Object::__call() Method '$methodName' in class '$this->class' an invalid format: " .
var_export(Object::$extraMethods[$this->class][$methodName],true), E_USER_ERROR);
131: }
132: } else {
* 133: user_error("Object::__call() Method '$methodName' not found in class '$this->class'",
E_USER_ERROR);
134: }
135: }
136:
137: /**
138: * This function allows you to overload class creation methods, so certain classes are
139: * always created correctly over your system.

<ul>user_error(Object::__call() Method 'get_static' not found in class 'FileDataObjectManager',256)
line 133 of Object.php

Object->__call(get_static,Array)

Object->get_static(File,allowed_file_types)
line 87 of FileDataObjectManager.php

FileDataObjectManager->__construct(ArticlePage,Resources,Resource,Attachment,Array,getCMSFields_forPopup)
line 43 of ArticlePage.php

ArticlePage->getCMSFields(CMSMain)
line 380 of CMSMain.php

CMSMain->getEditForm(23)
line 855 of LeftAndMain.php

LeftAndMain->EditForm()
line 344 of LeftAndMain.php

LeftAndMain->getitem(HTTPRequest)
line 162 of Controller.php

Controller->handleAction(HTTPRequest)
line 107 of RequestHandler.php

RequestHandler->handleRequest(HTTPRequest)
line 122 of Controller.php

Controller->handleRequest(HTTPRequest)
line 262 of Director.php

Director::handleRequest(HTTPRequest,Session)
line 106 of Director.php

Director::direct(admin/getitem)
line 115 of main.php

</ul>

Avatar
UncleCheese

Forum Moderator, 4102 Posts

29 July 2010 at 2:38am

Yikes. Are you running a really old version of SS? Object::get_static() has been around since 2.3.0.