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.

Archive /

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

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

BLOG.. HELP ME!!


Reply


6 Posts   2427 Views

Avatar
ivan.pro

Community Member, 15 Posts

7 August 2008 at 4:42am

Edited: 07/08/2008 4:43am

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

Avatar
vstrazz

Community Member, 63 Posts

7 August 2008 at 7:56am

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

Avatar
ivan.pro

Community Member, 15 Posts

7 August 2008 at 4:29pm

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

Avatar
Fuzz10

Community Member, 787 Posts

7 August 2008 at 6:17pm

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.

Avatar
Willr

Forum Moderator, 5513 Posts

7 August 2008 at 9:48pm

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

Avatar
ivan.pro

Community Member, 15 Posts

8 August 2008 at 3:38am

Edited: 08/08/2008 3:39am

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