?
Solved

Error message adding entries in control panel

Posted on 2011-04-20
1
Medium Priority
?
165 Views
Last Modified: 2012-05-11
I am getting this error message when I add entries in my control panel anyone know how to fix this.

Missing Method in CmsPagesController

Error: The action core_page is not defined in controller CmsPagesController

Error: Create CmsPagesController::core_page() in file: app/controllers/cms_pages_controller.php.

<?php
class CmsPagesController extends AppController {

      var $name = 'CmsPages';


      function core_page() {

      }

}
?>
0
Comment
Question by:smphil
1 Comment
 
LVL 2

Accepted Solution

by:
pixalax earned 2000 total points
ID: 35439559
Could you also post AppController class please? It doesn't make any sense like this.

<?php
class CmsPagesController {

      var $name = 'CmsPages';


      function core_page() {
		echo $this->name;
      }

}

$cms = new CmsPagesController();
$cms->core_page();
?>

Open in new window


This is should work but since I don't have AppController class, I can't test what is the reason.

Could you please check and see if core_page() class method exists in AppController  first?
<?php
$AppController = new AppController ();
var_dump(method_exists($AppController ,'core_page'));

// For Static Class
var_dump(method_exists('AppController ','core_page'));
?>

Open in new window


Your code doesn't tell much.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month16 days, 2 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question