Error message adding entries in control panel

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() {

      }

}
?>
LVL 1
smphilAsked:
Who is Participating?
 
pixalaxCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.