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

Issues with installing blog module


Reply

3 Posts   1190 Views

Avatar
ThePatch

6 November 2008 at 5:31am Community Member, 2 Posts

So I'm on my first run with Silver Stripe, all is going well until I tried to install the blog module. I get the below error when I try to run te db/build?flush=1

Building Database

Creating database tables
# Newsletter
# Newsletter_SentRecipient
# Newsletter_Recipient
# NewsletterType
# PageComment
# Post
# Post_Subscription
# GalleryPage_Extension
# Email_BounceRecord
# Email_BlackList
# PageView
# SiteTree
# Field SiteTree.ClassName: changed to enum('SiteTree','Page','GhostPage','BlogEntry','BlogHolder','UserDefinedForm','FlickrGallery','Forum','ForumHolder','GalleryPage','ErrorPage','RedirectorPage','VirtualPage','YoutubeGallery','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','UserDefinedForm','FlickrGallery','Forum','ForumHolder','GalleryPage','ErrorPage','RedirectorPage','VirtualPage','YoutubeGallery','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree')
# Field SiteTree_Live.ClassName: changed to enum('SiteTree','Page','GhostPage','BlogEntry','BlogHolder','UserDefinedForm','FlickrGallery','Forum','ForumHolder','GalleryPage','ErrorPage','RedirectorPage','VirtualPage','YoutubeGallery','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','UserDefinedForm','FlickrGallery','Forum','ForumHolder','GalleryPage','ErrorPage','RedirectorPage','VirtualPage','YoutubeGallery','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree')
# Field SiteTree_versions.ClassName: changed to enum('SiteTree','Page','GhostPage','BlogEntry','BlogHolder','UserDefinedForm','FlickrGallery','Forum','ForumHolder','GalleryPage','ErrorPage','RedirectorPage','VirtualPage','YoutubeGallery','SubscribeForm') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','UserDefinedForm','FlickrGallery','Forum','ForumHolder','GalleryPage','ErrorPage','RedirectorPage','VirtualPage','YoutubeGallery','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','FlickrWidget','YoutubeWidget') character set utf8 collate utf8_general_ci default 'Widget' (from enum('Widget','FlickrWidget','YoutubeWidget') 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()); } } } ?>
Error

The website server has not been able to respond to your request.

Any guidance?
Apache & SQL are within specs

Avatar
ThePatch

13 November 2008 at 6:08am Community Member, 2 Posts

*bump*

And I modified the blogholder.php file to change <? to <?php

For anyone who has it working on their site, what version of the blog module and silver stripe did you use? I thought I grabbed the latest

Avatar
identalyst

27 November 2008 at 9:22pm Community Member, 2 Posts

try switching on PHP short tags in WAMP, worked for me... :^)