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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

error accessing admin after trying to update


Reply


3 Posts   1818 Views

Avatar
pjssms

Community Member, 49 Posts

24 August 2009 at 6:17am

hello,

I have tried to update silverstripe but it failled and i reverted to the old version.

After turning a detailed error i am getting this:
[User Error] Bad class to singleton() - UserDefinedForm
GET /admin

Line 261 in /home/psantos/public_html/sapphire/core/Core.php
Source

252 *
253 * @param string $className
254 * @return Object
255 */
256 function singleton($className) {
257    global $_SINGLETONS;
258    if(!isset($className)) user_error("singleton() Called without a class", E_USER_ERROR);
259    if(!is_string($className)) user_error("singleton() passed bad class_name: " . var_export($className,true), E_USER_ERROR);
260    if(!isset($_SINGLETONS[$className])) {
261     if(!class_exists($className)) user_error("Bad class to singleton() - $className", E_USER_ERROR);
262       $_SINGLETONS[$className] = Object::strong_create($className,null, true);
263       if(!$_SINGLETONS[$className]) user_error("singleton() Unknown class '$className'", E_USER_ERROR);
264    }
265    return $_SINGLETONS[$className];
266 }
267

Trace

* Bad class to singleton() - UserDefinedForm
Line 261 of Core.php
* singleton(UserDefinedForm)
Line 206 of SiteTree.php
* SiteTree::page_type_classes()
Line 312 of CMSMain.php
* CMSMain->PageTypes()
Line 976 of CMSMain.php
* CMSMain->AddPageOptionsForm()
* call_user_func_array(Array,Array)
Line 318 of ViewableData.php
* ViewableData->obj(AddPageOptionsForm)
Line 44 of .cache.home.psantos.public_html.cms.templates.Includes.CMSMain_left.ss
* include(/tmp/silverstripe-cache-home-psantos-public_html/.cache.home.psantos.public_html.cms.templates.Includes.CMSMain_left.ss)
Line 354 of SSViewer.php
* SSViewer->process(CMSMain)
Line 773 of ViewableData.php
* ViewableData->renderWith(Array)
Line 480 of LeftAndMain.php
* LeftAndMain->Left()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(Left,,1)
Line 59 of .cache.home.psantos.public_html.cms.templates.LeftAndMain.ss
* include(/tmp/silverstripe-cache-home-psantos-public_html/.cache.home.psantos.public_html.cms.templates.LeftAndMain.ss)
Line 354 of SSViewer.php
* SSViewer->process(CMSMain)
Line 175 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 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)
Line 118 of main.php

How can i fix this or how can i upgrade silverstripe ?

Avatar
Willr

Forum Moderator, 5513 Posts

24 August 2009 at 10:03am

UserForms has been separated into a module instead of being in the core. If you are using the functionality of a user defined form then you will need to download that module from http://silverstripe.org/user-forms-module/

Avatar
pjssms

Community Member, 49 Posts

24 August 2009 at 10:28am

I don´t think i am using it but i will try to follow what you say