Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Blog install error

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1347 Views
  • Emileneth
    Avatar
    Community Member
    3 Posts

    Blog install error Link to this post

    I got this error on the DB rebuild

    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 249

    Notice: Undefined index: _obsolete_page in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 249

    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 252

    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 253

    Table Page: renamed to _obsolete_Page
    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 249

    Notice: Undefined index: _obsolete_page_versions in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 249

    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 252

    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 253

    Table Page_versions: renamed to _obsolete_Page_versions
    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 249

    Notice: Undefined index: _obsolete_page_live in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 249

    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 252

    Notice: Undefined variable: suffix in C:\wamp\www\silverstripe\sapphire\core\model\Database.php on line 253

    Table Page_Live: renamed to _obsolete_Page_Live
    GhostPage
    BlogEntry "Datetime", "Author" => "Text", "Tags" => "Text" ); static $casting = array( "Date" => "Date" ); static $defaults = array( "ProvideComments" => true ); static $allowed_children = "none"; /** * overload so that the default date is today. */ public function populateDefaults(){ parent::populateDefaults(); $this->Date = date("d/m/Y H:i:s",time()); } /** * Ensures the most recent article edited on the same day is shown first. */ public function setDate($val){ $datepart = date("Y-m-d",strtotime($val)); $minutepart = date("H:i:s",time()); $date = $datepart . " " . $minutepart; return $this->setField("Date",$date); } function getCMSFields() { Requirements::javascript('blog/javascript/bbcodehelp.js'); Requirements::css('blog/css/bbcodehelp.css'); $firstName = Member::CurrentMember() ? Member::currentMember()->FirstName : ''; $codeparser = new BBCodeParser(); $fields = parent::getCMSFields(); $fields->removeFieldFromTab("Root.Content.Main","Content"); $fields->addFieldToTab("Root.Content.Main", new TextareaField("Content", "Content", 20)); $fields->addFieldToTab("Root.Content.Main", new CalendarDateField("Date", "Date"),"Content"); $fields->addFieldToTab("Root.Content.Main", new TextField("Author", "Author", $firstName),"Content"); $fields->addFieldToTab("Root.Content.Main", new LiteralField("BBCodeHelper", "
    " . "BBCode help" . "
    ".$codeparser->useable_tagsHTML()."
    ")); $fields->addFieldToTab("Root.Content.Main", new TextField("Tags", "Tags (comma sep.)"),"Content"); return $fields; } function Tags() { $theseTags = split(" *, *", trim($this->Tags)); $output = new DataObjectSet(); foreach($theseTags as $tag) { $output->push(new ArrayData(array( "Tag" => $tag, "Link" => $this->getParent()->Link() . '?tag=' . urlencode($tag) ))); } if($this->Tags){ return $output; } } function SideBar() { return $this->getParent()->SideBar(); } function ParagraphSummary(){ $content = new Text('Content'); $content->value = Convert::raw2xml($this->Content); $parser = new BBCodeParser($content->FirstParagraph()); return $parser->parse(); } function ParsedContent() { $parser = new BBCodeParser($this->Content); $content = new Text('Content'); $content->value =$parser->parse(); return $content; } function EditURL(){ return $this->getParent()->Link('post')."/".$this->ID."/"; } } class BlogEntry_Controller extends Page_Controller { function init() { parent::init(); Requirements::themedCSS("blog"); } function unpublishPost(){ if(!Permission::check('ADMIN')){ Security::permissionFailure($this, "Unpublishing blogs is an administrator task. Please log in."); } else{ $SQL_id = Convert::raw2sql($this->ID); $page = DataObject::get_by_id("SiteTree", $SQL_id); $page->deleteFromStage('Live'); $page->flushCache(); $page = DataObject::get_by_id("SiteTree", $SQL_id); $page->Status = "Unpublished"; Director::redirect($this->getParent()->Link()); } } } ?>
    FATAL ERROR: Bad class to singleton() - BlogEntry
    At line 85 in C:\wamp\www\silverstripe\sapphire\core\Core.php

    user_error(Bad class to singleton() - BlogEntry,256)
    line 85 of Core.php

    singleton(BlogEntry)
    line 175 of DatabaseAdmin.php

    DatabaseAdmin->doBuild()
    line 90 of DatabaseAdmin.php

    DatabaseAdmin->build(Array)
    line 261 of Controller.php

    Controller->run(Array)
    line 104 of Director.php

    Director::direct(/db/build)
    line 158 of main.php

    Context

    --------------------------------------------------------------------------------

    Debug (Debug::showError() in line 180 of Debug.php)
    className =
    BlogEntry
    _SINGLETONS =
    Member =
    Database record: Member
    ID :
    0
    Newsletter =
    Database record: Newsletter
    ID :
    0
    Newsletter_SentRecipient =
    Database record: Newsletter_SentRecipient
    ID :
    0
    Newsletter_Recipient =
    Database record: Newsletter_Recipient
    ID :
    0
    NewsletterType =
    Database record: NewsletterType
    ID :
    0
    PageComment =
    Database record: PageComment
    ID :
    0
    Post =
    Database record: Post
    ID :
    0
    Post_Subscription =
    Database record: Post_Subscription
    ID :
    0
    Email_BounceRecord =
    Database record: Email_BounceRecord
    ID :
    0
    Email_BlackList =
    Database record: Email_BlackList
    ID :
    0
    PageView =
    Database record: PageView
    ID :
    0
    SiteTree =
    Database record: SiteTree
    ID :
    0
    Translatable = Translatable::__set_state(array( 'translatableFields' => array ( 0 => NULL, 1 => true, 2 => NULL, 3 => NULL, 4 => NULL, 5 => NULL, 6 => NULL, 7 => NULL, 8 => NULL, ), 'original_values' => NULL, 'owner' => NULL, 'extension_instances' => array ( ), 'class' => 'Translatable', ))
    QueuedEmail =
    Database record: QueuedEmail
    ID :
    0
    File =
    Database record: File
    ID :
    0
    EditableCheckboxOption =
    Database record: EditableCheckboxOption
    ID :
    0
    EditableDropdownOption =
    Database record: EditableDropdownOption
    ID :
    0
    EditableFormField =
    Database record: EditableFormField
    ID :
    0
    EditableRadioOption =
    Database record: EditableRadioOption
    ID :
    0
    SubmittedForm =
    Database record: SubmittedForm
    ID :
    0
    SubmittedFormField =
    Database record: SubmittedFormField
    ID :
    0
    Group =
    Database record: Group
    ID :
    0
    Member_UnsubscribeRecord =
    Database record: Member_UnsubscribeRecord
    ID :
    0
    Permission =
    Database record: Permission
    ID :
    0
    Widget =
    Database record: Widget
    ID :
    0
    WidgetArea =
    Database record: WidgetArea
    ID :
    0
    Page =
    Database record: Page
    ID :
    0
    GhostPage =
    Database record: GhostPage
    ID :
    0


    any ideas?

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Blog install error Link to this post

    open up blog/code/BlogHolder.php and blog/code/BlogArticle.php and make sure they start with <?php rather then just <?. This was a bug for some setups - It should be fixed if you download the latest dailybuild of the blog

  • Emileneth
    Avatar
    Community Member
    3 Posts

    Re: Blog install error Link to this post

    Thanx willr

    i wasnt aware that the blog may have updated versions, im used to find info only on forums

  • jam13
    Avatar
    121 Posts

    Re: Blog install error Link to this post

    Ahhhh - that's must be what killed our blog when we upgraded to 2.2.3 last week! That's two manifest parsing bugs I've hit in two days.

    1347 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.