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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Blog install error


Go to End


4 Posts   1926 Views

Avatar
Emileneth

Community Member, 3 Posts

11 November 2008 at 10:29am

Edited: 11/11/2008 10:36am

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?

Avatar
Willr

Forum Moderator, 5523 Posts

11 November 2008 at 3:08pm

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

Avatar
Emileneth

Community Member, 3 Posts

12 November 2008 at 4:49am

Thanx willr

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

Avatar
jam13

121 Posts

12 November 2008 at 5:18am

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.