Error: 0 - Using $this when not in object context Topic is solved

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
cbrace
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Wed May 05, 2010 10:04 pm
Location: Amsterdam
Contact:

Error: 0 - Using $this when not in object context

Post by cbrace » Sat Jun 29, 2019 6:51 pm

Hi all,

In 2013 I built a website using Joomla. The contents have been static, so I haven't paid much attention to it, only updating Joomla and a couple of extensions from time to time.

The home page now displays this error message: 0 - Using $this when not in object context.

I found a couple of hits here on this forum which suggest incompatibility with an obsolete extension. I tried disabling the main ones I use to no avail.

The home page source gives me no hints:

Code: Select all

<body>
  <div align="center">
    <div id="error">
      <h1 align="center"><a href="/" class="ihrlogo">[NO LOGO]</a></h1>
      0 - Using $this when not in object context      <p>Go to the Home Page: 
      <a href="/">Home Page</a>.</p>
          </div>
  </div>
</body>

</html>
I switched on error reporting but I don't see any helpful info on-screen or in ./logs/

As a very part-time Joomla admin, I am utterly baffled. Can anyone suggest a way forward for me here?

Edit

1. The admin back-end works OK.
2. Had the current Joomla version installed, v3.9.8. Rolled back to an earlier backup from last November, so it is back at 3.9.0. Backup shows the same problem.

User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2041
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Re: Error: 0 - Using $this when not in object context

Post by JAVesey » Sat Jun 29, 2019 6:58 pm

cbrace wrote:
Sat Jun 29, 2019 6:51 pm
As a very part-time Joomla admin, I am utterly baffled. Can anyone suggest a way forward for me here?
Yes, there is a very good chance that one of your extensions is not compatible with the version of PHP running on your server.

Your hosting company has possibly upgraded your PHP version leaving your website lingering in the past.

You need to update all your extensions.
John V
Cardiff, Wales, UK
Uses Joomla 3.9.11 and PHP7.3

cbrace
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Wed May 05, 2010 10:04 pm
Location: Amsterdam
Contact:

Re: Error: 0 - Using $this when not in object context

Post by cbrace » Sat Jun 29, 2019 7:41 pm

Thanks John. Yeah I updated my VPS to php72 awhile back and I didn't notice until now that it broke something on this one site. I found the culprit: FW Gallery. Disabling didn't help, actually had to delete it. There is a new version which I downloaded and installed, but the components have been renamed and I'll need to fix the menus now, or use a different photo gallery extension.


Post Reply

Return to “Administration Joomla! 3.x”