Witam, mam pewien problem. Mam napisany projekt w symfony na linuxie, zrobilem freeze'a i po przeniesieniu go na windowsa na serwer XAMPP/Webserv, po wejsciu na strone glowna dostaje taki oto komunikat:
Fatal error: Call to undefined method NodePeer::retrievebypk() in C:\Program Files\WebServ\httpd\apps\core\modules\node\actions\actions.class.php on line 31
A oto zawartosc tego pliku:
<?php
/**
* node actions.
*
* @package simplecms
* @subpackage node
* @author Upgreydd
* @version SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $
*/
class nodeActions extends sfActions
{
/**
* Executes index action
*
* @param sfRequest $request A request object
*/
public function executeIndex(sfWebRequest $request)
{
foreach(NodeTypePeer::doSelect(new Criteria()) as $type){
$types[]=$type->getName();
}
$c=new Criteria();
$c->add(NodePeer::TYPE, $types, Criteria::IN);
$this->nodes=NodePeer::doSelect($c);
}
public function executeView(sfWebRequest $request)
{
$this->forward404Unless($this->node=NodePeer::retrieveByPK($request->getParameter('id',0)), '');
$this->getResponse()->setTitle(html_entity_decode($this->getResponse()->getTitle())." :: ".$this->node->getTitle()); }
public function executeError404(sfWebRequest $request)
{
$this->forward404Unless($main=ConfigPeer::getByName('error_404'), '');
$request->setParameter('id', $main->getValue());
$wd=new Watchdog();
$wd->setName('Http Error 404: Strony '.$_SERVER['REQUEST_URI'].' nie znaleziono.');
$wd->setPrior(5);
$wd->save();
$this->forward('node', 'view');
}
public function executeEdit(sfWebRequest $request){
if($request->getParameter('id',false)){
$this->forward404Unless($obj=NodePeer::retrieveByPK($request->getParameter('id',0)), '');
$form=new NodeForm($obj);
} else {
$form=new NodeForm();
}
if($request->isMethod('post')){
$form->bind($request->getParameter('node'));
if($form->isValid()){
$form->save();
$this->getUser()->setFlash('notice', 'Zmiany zostały zapisane!');
$obj=$form->getObject();
$this->redirect('@node?id='.$obj->getId().'&action=view');
}
}
$this->getResponse()->addJavascript('admin/node_edit', 'last');
$this->getResponse()->addJavascript('ckeditor/ckeditor');
$this->getResponse()->addJavascript('jquery-ui.js');
$this->getResponse()->addStylesheet('jquery-ui/jquery-ui.css');
$this->form=$form;
}
//$this->getUser()->setFlash('notice', $value);
public function executeDelete(sfWebRequest $request){
$this->forward404Unless($node=NodePeer::retrieveByPK($request->getParameter('id',0)), '');
if($node->getLocked()){
$this->getUser()->setFlash('notice', 'Nie można usunąć tej podstrony, ponieważ jest zablokowana!');
} else {
$node->delete();
$this->getUser()->setFlash('notice', 'Podstrona została usunięta!');
}
$this->redirect('node/index');
}
/**
* Metoda odpowiedzialna za podawanie linków w zarządzaniu menu
*
* @return array with nodes
*/
public static function getUrls
(){ return NodePeer::doSelect(new Criteria());
}
public function postExecute(){
if($this->getUser()->isAuthenticated()){
$this->getResponse()->addStylesheet('admin/node', 'last');
}
$l=explode('.',ConfigPeer
::getByName('layout')->getValue()); $this->setLayout($l[0]);
}
public function executeNewslist(sfWebRequest $request){
$c=new Criteria();
$c->add(NodePeer::TYPE, 'news');
$c->addDescendingOrderByColumn(NodePeer::CREATED_AT);
$c->setLimit(10);
$this->nodes=NodePeer::doSelect($c);
}
public function executeArticles(sfWebRequest $request) {
$this->forward404Unless($this->category=CategoryPeer::retrieveByPK($request->getParameter('id',0)),'');
$c=new Criteria();
$cr=$c->getNewCriterion(NodePeer::CATEGORY_ID, $this->category->getId());
$cr->addAnd($c->getNewCriterion(NodePeer::TYPE, 'article'));
$c->add($cr);
$c->addDescendingOrderByColumn(NodePeer::CREATED_AT);
$c->setLimit(10);
$this->nodes=NodePeer::doSelect($c);
}
public function executeArticle(sfWebRequest $request){
$this->forward404Unless($this->node=NodePeer::retrieveByPK($request->getParameter('id', 0)), '');
}
public function executeGallerylist(sfWebRequest $request){
$c=new Criteria();
$c->add(NodePeer::TYPE, 'gallery');
$c->addDescendingOrderByColumn(NodePeer::CREATED_AT);
$c->setLimit(10);
$this->nodes=NodePeer::doSelect($c);
}
}
Ktos moze mial podobny problem?
Ten post edytował Upgreydd 4.12.2009, 23:18:52