I am getting these errors after moving folders from a test folder to my public_html live folder
I am getting these errors after moving folders from a test folder to my public_html live folder.
Fatal error: Call to a member function getId() on a non-object in /.../Page.php on line 67
Fatal error: Call to a member function checkIdentifier() on a non-object in /.../Router.php on line 90
This is what the lines look like
PAGE.PHP
$page = Mage::getSingleton('cms/page');
if (!is_null($pageId) && $pageId!==$page->getIdentifier()) {
$delimeterPosition = strrpos($pageId, '|');
if ($delimeterPosition) {
$pageId = substr($pageId, 0, $delimeterPosition);
ROUTER.PHP
$page = Mage::getModel('cms/page');
$pageId = $page->checkIdentifier($identifier, Mage::app()->getStore()->getId());
if (!$pageId) {
return false;
Solutions
Just a thought, but it looks like you should be calling getIdentifier
and not getId
? -- OR Rename getIdentifier
to getID
$page = Mage::getSingleton('cms/page');
if (!is_null($pageId) && $pageId!==$page->getId()) {
$delimeterPosition = strrpos($pageId, '|');
if ($delimeterPosition) {
$pageId = substr($pageId, 0, $delimeterPosition);
It's hard to tell without seeing how this is called, and what class getIndentifier
or getId
are coming from...
Looks like w/e file the Mage class is in is not being loaded correctly. Check that your include_path is set properly in your php.ini file on your live environment and that the files are in the directories you expect if you gave them absolute paths.