Call to a member function mark() on a non-object in Joomla CMS

What?
This is a quick note on one reason you may get the above error in a Joomla CMS environment.

copyraw
Call to a member function mark() on a non-object in /public_html/index.php
  1.  Call to a member function mark() on a non-object in /public_html/index.php 

How?
Not really a solution here because this is indicating that the system can't find the core framework files. Yes the bad news is you have lost your site. The good news is that it's only the core files and component files. Here are some tips when restoring the site to return it to as it was.

The error refers to a function used by the core framework. Comment it out and you get an error referring to the includes/framework.php file. Comment that out and you will get errors regarding other elements of the CMS.

This error could have been caused by many things but in the case of one of my clients, the error was due to an update process gone wrong. Not really the fault of Akeeba, Joomla or anyone, it's just one of those things.

Check the sizes of the PHP files on your site and hope that they're not at 0 bytes. Excluding the HOME folder - only check the subfolders. If they are, you've lost the Joomla CMS and you'll need to restore them from a backup.

NOTE: Only restore the files! The images and database were unaffected in our case and could be left as they were. Our last file backup was over a year old but we only needed the core files, a working system, and then we could proceed with a standard Joomla update.

I suspected that part of an auto-update process had corrupted all the files. In our case, the problem was that the system tried to update Akeeba (a 3rd party component to do backups) simultaneously or prior to updating the core Joomla CMS. Ticking both options and then updating re-created the error.

I restored the files (using a backup to overwrite the existing PHP files), leaving the database and images folder unchanged. I updated just the Joomla CMS and then the option to update Akeeba disappeared.

The files backup was over a year old but the content was unaffected, the site was restored to satisfaction... not bad for an hours work.

So I've heard it mentioned before, never thought much of it, but now I know. The lesson here is simply to
Update the Joomla Core separately and prior to any 3rd-party extensions

If you didn't have a backup, then I would simply take a Joomla install (preferably NOT the most recent version - so that you can force it to update later on) and copy over the core files. Get that working and then begin installing any third-party extensions, and then update Joomla Core (by itself) and then any updates to the third-party extensions.
Category: Joomla :: Article: 536

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Related Articles

Joes Revolver Map

Joes Word Cloud

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.