All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
  Print view

another pizza guide issue
Author Message
PostPosted: Fri Apr 29, 2011 12:07 pm 
Regular
Offline

Joined: Fri Apr 29, 2011 11:38 am
Posts: 26
Hello,
I searched on the forum, but unsuccessfully.
I have problems with Pizza Guide , part II (part I is OK).

When I click on the pizza categories link I get this error:

Fatal error: Call to a member function dispatch() on a non-object in /var/www/html/achievo/atk/class.atkcontroller.inc on line 247

Could you please help me ?

I have Ubuntu 10.04, PHP 5.3.2 , mysql 5.1

Here are my files:

------------------------

<?php
//achievo_modules/pizzaman/module.inc
class mod_pizzaman extends atkModule
{
function getMenuItems()
{
$this->menuitem("pizza", dispatch_url("pizzaman.pizza", "admin"));
$this->menuitem("pizza_categories", dispatch_url("pizzaman.pizza_category","admin"));
}

function getNodes()
{
registerNode("pizzaman.pizza", array("admin", "add", "edit", "delete"));
registerNode("pizzaman.pizza_category", array("admin", "add","edit", "delete"));
}
}

?>
-------------------------------


<?php
//achievo_modules/pizzaman/class.pizza.inc
useattrib("atktextattribute");
useattrib("atknumberattribute");
useattrib("atkdateattribute");

class pizza extends atkNode
{
function pizza()
{
$this->atkNode("pizza");
$this->add(new atkAttribute("id", AF_PRIMARY|AF_HIDE|AF_AUTO_INCREMENT));
$this->add(new atkAttribute("name", AF_UNIQUE|AF_OBLIGATORY|AF_SEARCHABLE));
$this->add(new atkTextAttribute("description", 15, AF_OBLIGATORY|AF_SEARCHABLE));
$this->add(new atkNumberAttribute("price"));
$this->add(new atkDateAttribute("entrydate"));

$this->setIndex("name");
$this->setOrder("name");


$this->setTable("pizza");

}
}

?>

--------------------------------------

<?php
//achievo_modules/pizzaman/class.pizza_category.inc
class pizza_category extends atkNode
{
function pizza_category()
{
$this->atkNode("pizza_category");
$this->add(new atkAttribute("id", AF_AUTOKEY));
$this->add(new atkAttribute("name", AF_OBLIGATORY|AF_UNIQUE|AF_SEARCHABLE));
$this->setTable("pizza_categories");
$this->setOrder("name");
}
}
?>


Top
 Profile  
 

Re: another pizza guide issue
PostPosted: Sun May 01, 2011 7:45 pm 
Regular
Offline

Joined: Tue Jul 20, 2010 11:39 pm
Posts: 75
Hello alsmat,

Your error means that atknode was not created. Check your request, what node are you calling? The most common error in this case is that file name of a node actually ends with php and not inc. The contents of your files look correct.

Please note, that the name for modules folder is 'modules' and not 'achievo_modules'.
Code:
achievo/
|-- atk/
|-- modules/
|  |-- pizzaman
Tauras


Top
 Profile  
 

Re: another pizza guide issue
PostPosted: Wed Sep 25, 2013 6:25 pm 
Offline

Joined: Wed Sep 25, 2013 6:12 pm
Posts: 1
Can't be that hard to fix? I'd suggest asking Mark on the pizza. :p

_________________
Samsung galaxy aanbiedingen
iPhone 5c aanbieding


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group