Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » BLOG.. HELP ME!!

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: 2230 Views
  • ivan.pro
    Avatar
    Community Member
    15 Posts

    BLOG.. HELP ME!! Link to this post

    Hi.. I try to install blog but I find errors!
    I've got installed silverstripe 2.2.2 and I use wamp server. When I try to install blog I find this error:

    Building Database

    Creating database tables

    Newsletter
    Newsletter_SentRecipient
    Newsletter_Recipient
    NewsletterType
    PageComment
    Email_BounceRecord
    Email_BlackList
    PageView
    SiteTree
    Field SiteTree.ClassName: changed to enum('SiteTree','Page','GhostPage','BlogEntry','BlogHolder','UserDefinedForm','ErrorPage','RedirectorPage','VirtualPage','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','UserDefinedForm','ErrorPage','RedirectorPage','VirtualPage','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree')
    Field SiteTree_Live.ClassName: changed to enum('SiteTree','Page','GhostPage','BlogEntry','BlogHolder','UserDefinedForm','ErrorPage','RedirectorPage','VirtualPage','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','UserDefinedForm','ErrorPage','RedirectorPage','VirtualPage','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree')
    Field SiteTree_versions.ClassName: changed to enum('SiteTree','Page','GhostPage','BlogEntry','BlogHolder','UserDefinedForm','ErrorPage','RedirectorPage','VirtualPage','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','UserDefinedForm','ErrorPage','RedirectorPage','VirtualPage','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree')
    QueuedEmail
    File
    EditableCheckboxOption
    EditableDropdownOption
    EditableFormField
    EditableRadioOption
    SubmittedForm
    SubmittedFormField
    Group
    Member
    Member_UnsubscribeRecord
    Permission
    Widget
    Field Widget.ClassName: changed to enum('Widget','ArchiveWidget','BlogManagementWidget','RSSWidget','TagCloudWidget') character set utf8 collate utf8_general_ci default 'Widget' (from enum('Widget') character set utf8 collate utf8_general_ci default 'Widget')
    WidgetArea
    Page
    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-v2.2.2\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
    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

    Does somebody can help me?
    Thank you
    Ivan

  • vstrazz
    Avatar
    Community Member
    63 Posts

    Re: BLOG.. HELP ME!! Link to this post

    take it out of dev mode, and rebuild the database.

  • ivan.pro
    Avatar
    Community Member
    15 Posts

    Re: BLOG.. HELP ME!! Link to this post

    OK.. I take dev mode out. But how can I rebuild my database? What have I got to do?

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: BLOG.. HELP ME!! Link to this post

    Rebuild the database by calling /db/build?flush=1

    Someone correct me if I'm wrong , but I also recommend making sure you are using the latest SVN build of the blog module.

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: BLOG.. HELP ME!! Link to this post

    if you dont have SVN also try the dailybuild of the blog module - visit http://dailybuilds.silverstripe.com/modules-tarballs/ and select the blog zip with the latest date. This will be the most up to date version of the code. So it might be buggy but it will also have newer features and bug fixs

  • ivan.pro
    Avatar
    Community Member
    15 Posts

    Re: BLOG.. HELP ME!! Link to this post

    OK I've installed the latest version!
    The blog and the widgets are OK, WITHOUT the widget I need!!! what bad luck!

    I see a whit window with a new error message. You can see in the post. I see this screen ONLY when I install the choose language widget! Only in this case.. And I've installed blog only for use this widget..
    The blog runs, but not with his template (I use blackcandy..).

    Thank you..
    Ivan

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