17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1985 Views |
-
HELP! ADMIN BUSTED???

14 August 2008 at 7:02pm
Front end is there. but the admin is busted, I get the following codevomit:
"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()); } } } ?>
ErrorThe website server has not been able to respond to your request.
ANY IDEAS???
-
Re: HELP! ADMIN BUSTED???

14 August 2008 at 10:59pm
Well that error msg is the standard error msg - whip the site into dev mode to get the proper error by adding this to your /mysite/_config.php file
Director::set_environment_type("dev");
-
Re: HELP! ADMIN BUSTED???

14 August 2008 at 11:54pm
FATAL ERROR: Bad class to singleton() - BlogEntry
At line 85 in /usr/home/oneo21/www/htdocs/sapphire/core/Core.phpuser_error(Bad class to singleton() - BlogEntry,256)
line 85 of Core.phpsingleton(BlogEntry)
line 181 of CMSMain.phpCMSMain->generateDataTreeHints()
line 116 of CMSMain.phpCMSMain->SiteTreeAsUL()
call_user_func_array(Array,Array)
line 404 of ViewableData.phpViewableData->XML_val(SiteTreeAsUL,,1)
line 263 of .cache.usr.home.oneo21.www.htdocs.cms.templates.Includes.CMSMain_left.ssinclude(/var/tmp/silverstripe-cache-usr-home-oneo21-www-htdocs/.cache.usr.home.oneo21.www.htdocs.cms.templates.Includes.CMSMain_left.ss)
line 197 of SSViewer.phpSSViewer->process(CMSMain)
line 763 of ViewableData.phpViewableData->renderWith(Array)
line 365 of LeftAndMain.phpLeftAndMain->Left()
call_user_func_array(Array,Array)
line 404 of ViewableData.phpViewableData->XML_val(Left,,1)
line 89 of .cache.usr.home.oneo21.www.htdocs.cms.templates.LeftAndMain.ssinclude(/var/tmp/silverstripe-cache-usr-home-oneo21-www-htdocs/.cache.usr.home.oneo21.www.htdocs.cms.templates.LeftAndMain.ss)
line 197 of SSViewer.phpSSViewer->process(CMSMain)
line 296 of Controller.phpController->defaultAction(index,Array)
line 267 of Controller.phpController->run(Array)
line 104 of Director.phpDirector::direct(admin)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)* className =
BlogEntry
* _SINGLETONS =
o Member =
Database record: Member
+ ID :0
o Group =
Database record: Group
+ ID :0
o Group_Unsecure =
Database record: Group_Unsecure
+ ID :0
o Page =
Database record: Page
+ ID :0
o GhostPage =
Database record: GhostPage
+ ID :0
o UserDefinedForm =
Database record: UserDefinedForm
+ ID :0
o WelcomePage =
Database record: WelcomePage
+ ID :0
o ErrorPage =
Database record: ErrorPage
+ ID :0
o RedirectorPage =
Database record: RedirectorPage
+ ID :0
o VirtualPage =
Database record: VirtualPage
+ ID :0
o SubscribeForm =
Database record: SubscribeForm
+ ID :0
o SiteTree =
Database record: SiteTree
+ ID :0
-
Re: HELP! ADMIN BUSTED???

15 August 2008 at 7:32am
Any body have any ideas on this? I was trying to migrate from my local server to the remote server and the front end works but the backend is broken (see above) need to launch this site for the client this weekend and don't want to start from scratch remotely unless completely neccessary...
-
Re: HELP! ADMIN BUSTED???

15 August 2008 at 8:11am
It means that the database thinks there's a content class called BlogEntry, but for whatever reason it's not in your file system.
Double check to see that you moved the blog module with the rest of your site. Make sure the name of the file is BlogEntry.php, and make sure that the name of the class is BlogEntry.
That error is usually really easy to clean up.
-
Re: HELP! ADMIN BUSTED???

15 August 2008 at 9:59am
I think the bug is that if you have php short tags turned off theres a bug with the blog module that the code starts with a <? instead of <?php you just need to update that in BlogEntry.php and BlogHolder.php
-
Re: HELP! ADMIN BUSTED???

16 August 2008 at 12:36am
UncleCheese thanks for the reply, WILR YOU ROCK! I didn't even realize the short tags was turned off. I've found the clients host to be abominable. Loving the SS though. Will post the site when I get it up. Thanks again guys.
| 1985 Views | ||
|
Page:
1
|
Go to Top |


