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 = Mage::getSingleton('cms/page');
    if (!is_null($pageId) && $pageId!==$page->getIdentifier()) {
        $delimeterPosition = strrpos($pageId, '|');
        if ($delimeterPosition) {
            $pageId = substr($pageId, 0, $delimeterPosition);


$page   = Mage::getModel('cms/page');
$pageId = $page->checkIdentifier($identifier, Mage::app()->getStore()->getId());
if (!$pageId) {
    return false;


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.

Tags: PHP / Database / Magento

Similar questions

Getting 404 on front end and back end after installed Magento 2.4.2 in XAMPP, Windows 10 HOw to fix these
I'm new in magento and need to fix these issue error appears - "Not Found The requested URL was not found on this server. Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.4.15 Server at localhost Port 80" appears 404 on front end and back-end also OS: Windows 10, Xampp v3.2.4, Composer tried both v1 & v2, Mangento Version: 2.4.2, elasticsea...
Magento 2 Autoload error after moving site on live domain
I set up my site on my test server and after moving it to my live domain, its giving me Please suggest me how to fix this issue. Thanks
Magento 2 Site after moving from local server to live all pages showing 404 except Home page?
After moving My Magento 2 website from local server to Production server All the Pages including admin showing/redirecting 404 page except Home Page. How Can I resolve this issue ? Can any one please help me on this.
No theme and wrong redirection after moving live site to local server - Magento 1.7
I've taken over responsibility of a Magento installation. Since the installation requires updates and further progress I've decided to move a copy of the live shop to a local web server for testing puroses. When I open the site (local-server-ip/magento/index.php) in browser the side loads but not the theme. And when I click on any link it redirects...
404 Error after moving Magento 2.2.3 from localhost to live server
I had installed the Magento on my localhost, Install and customise the theme and now when I uploaded the website to the server. I cannot access the admin page; it gives me the 404 error, and my site is not displaying correctly. I have already change the URL to MySQL, core_config_data. Run the reindex and flush cache command also try to (php bin/Mag...
Magento in maintenance mode after importing database from live to test
I created a dump of my live database and imported it into staging by using n98-magerun. But now my website is in maintenance mode, even though there is no maintenance.flag file. I also tried to deactivate maintenance mode by using n98-magerun: Response: Maintenance mode off But it still fails and the maintenance site shows.

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.