Jump to:

23454 Posts in 18904 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Unknown class passed as parameter

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

Page: 1
Go to End
Author Topic: 1558 Views
  • evski
    Avatar
    Community Member
    6 Posts

    Unknown class passed as parameter Link to this post

    I recently tried to upgrade blog module using following process

    1. changed old folder name on server from "blog" to "blog_old"

    2. Uploaded new blog software to folder "blog"

    3. tried it out and nothing happened then realised i probably needed to upgrade silverstripe version first

    4. deleted folder "blog"

    5. renamed folder "blog_old" to "blog"

    6. Chaos - get website error and can not login as admin

    Changed my config to include " Director::set_environment_type("dev"); "

    and get following info

    Any help appreciated

    EVan

    [Warning] Unknown class passed as parameter
    GET /

    Line 420 in /home/nzsnow/lilymax/sapphire/core/Object.php
    Source

    411     * Prepare static variables before processing a {@link get_static} or {@link set_static}
    412     * call.
    413     */
    414    private static function prepare_statics($class) {
    415       // _cache_statics_prepared setting must come first to prevent infinite loops when we call
    416       // get_static below
    417       self::$_cache_statics_prepared[$class] = true;
    418
    419       // load statics now for DataObject classes
    420       if(is_subclass_of($class, 'DataObject')) {
    421          $extensions = Object::get_static($class, 'extensions');
    422          if($extensions) foreach($extensions as $extension) {
    423             if(preg_match('/^([^(]*)/', $extension, $matches)) {
    424                $extensionClass = $matches[1];
    425                DataObjectDecorator::load_extra_statics($class, $extensionClass);
    426             }

    Trace

    is_subclass_of(BlogTree,DataObject)
    Line 420 of Object.php
    Object::prepare_statics(BlogTree)
    Line 175 of Object.php
    Object::get_static(BlogTree,extensions)
    Line 264 of Object.php
    Object::uninherited_static(BlogTree,extensions)
    Line 488 of Object.php
    Object->__construct()
    Line 209 of DataObject.php
    DataObject->__construct(Array)
    Line 2429 of DataObject.php
    DataObject->buildDataObjectSet(MySQLQuery,DataObjectSet,SELECT `SiteTree_Live`.*, `GhostPage_Live`.*, `BlogEntry_Live`.*, `ErrorPage_Live`.*, `RedirectorPage_Live`.*, `VirtualPage_Live`.*, `SiteTree_Live`.ID, if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName FROM `SiteTree_Live` LEFT JOIN `GhostPage_Live` ON `GhostPage_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `BlogEntry_Live` ON `BlogEntry_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `ErrorPage_Live` ON `ErrorPage_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `RedirectorPage_Live` ON `RedirectorPage_Live`.ID = `SiteTree_Live`.ID LEFT JOIN `VirtualPage_Live` ON `VirtualPage_Live`.ID = `SiteTree_Live`.ID WHERE (ShowInMenus = 1 AND ParentID = 0) ORDER BY Sort,SiteTree)
    Line 2409 of DataObject.php
    DataObject->instance_get(ShowInMenus = 1 AND ParentID = 0,,,,DataObjectSet)
    Line 2383 of DataObject.php
    DataObject::get(SiteTree,ShowInMenus = 1 AND ParentID = 0)
    Line 146 of ContentController.php
    ContentController->getMenu(1)
    Line 177 of ContentController.php
    ContentController->Menu(1)
    call_user_func_array(Array,Array)
    Line 318 of ViewableData.php
    ViewableData->obj(Menu,Array,)
    Line 994 of ViewableData.php
    ViewableData_Customised->obj(Menu,Array)
    Line 44 of .cache.home.nzsnow.lilymax.themes.blackcandy.templates.Page.ss
    include(/home/nzsnow/lilymax/silverstripe-cache/.cache.home.nzsnow.lilymax.themes.blackcandy.templates.Page.ss)
    Line 354 of SSViewer.php
    SSViewer->process(Page_Controller)
    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 29 of ModelAsController.php
    ModelAsController->handleRequest(HTTPRequest)
    Line 44 of RootURLController.php
    RootURLController->handleRequest(HTTPRequest)
    Line 277 of Director.php
    Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    Director::direct(/)
    Line 118 of main.php

  • evski
    Avatar
    Community Member
    6 Posts

    Re: Unknown class passed as parameter Link to this post

    Update to this post by evski

    Mucking around I tried "dev/build/flush=1" appended to the hoem url and it seemed to work so that is great only problem is now only one of the original blog posts are on the live site

    http://www.lilymax.co.nz/my-blog/

    And if I do click on the one listed (Secret Diary) i get error

    Website Error
    There has been an error

    Geting closer to fixing the problem any ideas on how to get other blog posts back ?

    Thanks

    Evan

    1558 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.