0
Welcome Guest! Login
0 items Join Now

SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 320
    • Thanks: 13
    • Another Old Hack!

    SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • I have a site that I got a 500 error message after updating to Joomla 3.8.8. It is using the Gantry 4.0 template. I did some research and found a post by Mr. T and updated the error.php and offline.php files as recommended but I did not have a comingsoon.php file. Here is the thread: http://www.rockettheme.com/forum/gantry-for-joomla/272194-joomla-3-8-gantry-4-fix-for-offline-comingsoon-and-error-pages

      After making those changes, the blank page with the 500 error was replaced by the Error: 0 - Using $this when not in object context error page.

      Here is the URL:
      https://www.getdazzle.com/

      Error display:
      Error: 0 - Using $this when not in object context
      You may not be able to visit this page because of:
      
      an out-of-date bookmark/favourite
      a search engine that has an out-of-date listing for this site
      a mistyped address
      you have no access to this page
      The requested resource was not found.
      An error has occurred while processing your request.

      If I change the template from 'Gantry' to 'Beez2', the page loads fine but the look is not what we want.

      This site using the Gantry template was working fine prior to the update. Any ideas?
    • Last Edit: 5 years 10 months ago by Luke Douglas.
    • Just another old hacker!
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • You don't need to do that change if you update gantry and the gantry template to the latest versions.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 320
    • Thanks: 13
    • Another Old Hack!

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • MrT,

      The Gantry 4 template is updated to the last version - v4.1.29.

      Is Gantry 4 no longer a viable template for Joomla 3.8.8?

      Also, I do have twp another sites using Gantry v4.1.29 and they load fine after the 3.8.8 update: http://candcexcavation.com/ https://rushingenterprises.com/

      FYI, I've been updating all of my client sites to Gantry 5 but still have a small number on Gantry 4.
    • Last Edit: 5 years 10 months ago by Luke Douglas.
    • Just another old hacker!
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • g4 work on j3.8.x. the current version is g4.1.34 for both framework and template.

      Regards, Mark
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 320
    • Thanks: 13
    • Another Old Hack!

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • MrT,

      I installed the Gantry v4.1.34 framework and template on GetDazzle.com but no luck. So far, I have 16 other sites using the older Gantry v4.1.29 versions and they all work fine after the 3.8.8 update. I upgrade each one to v4.1.34 and they still work but not GetDazzle.com. :(

      In looking at the Console, I get this:

      In JS file,
      media/system/js/mootools-core.js?167d3e807ce8626fdca05b769132a3ce

      Uncaught TypeError:
      Uncaught TypeError: Cannot read property 'appendChild' of null
          at Object.bottom (mootools-core.js?167d3e807ce8626fdca05b769132a3ce:91)
          at HTMLDivElement.inject (mootools-core.js?167d3e807ce8626fdca05b769132a3ce:99)
          at Object.build (sidemenu.js:10)
          at Object.e.extend.$owner (mootools-core.js?167d3e807ce8626fdca05b769132a3ce:38)
          at Object.initialize (sidemenu.js:8)
          at Object.<anonymous> (mootools-more.js?167d3e807ce8626fdca05b769132a3ce:27)
          at Object.e.extend.$owner (mootools-core.js?167d3e807ce8626fdca05b769132a3ce:38)
          at new <anonymous> (mootools-core.js?167d3e807ce8626fdca05b769132a3ce:37)
          at sidemenu.js:22
          at mootools-core.js?167d3e807ce8626fdca05b769132a3ce:121

      Looking at the JS, this seems to be the reference line:
      bottom:function(a,b){b.appendChild(a)}

      Does this ring any bells?

      Update: I did some additional digging and someone fixed it by downgrading the PHP. After downgrading to PHP 5.6, I got a blank page with the following error:
      Fatal error: Using $this when not in object context in /home/XXXXXXXX/public_html/modules/mod_random_image/tmpl/default.php on line 16

      In researching this issue, I found this page:

      https://github.com/joomla/joomla-cms/pull/20533/files#diff-4ce8cd335cd7524a2158e10b2bafdded

      I downloaded the 'default.php' file and replaced "modules/mod_random_image/tmpl/default.php".

      No luck! Still get the same error message and I did clear website / browser cache.

      So I changed the PHP back to 7.0 and now I'm back to getting a partial home page with the error message:
      Error: 0 - Using $this when not in object context

      So as a LAST STRAW, I unpublished the 3 random image modules and 'viola', the home page loaded.

      So anyone that can help solve this issue with the Random Image Module so I can get them back published?
    • Last Edit: 5 years 10 months ago by Luke Douglas.
    • Just another old hacker!
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • I get a 403 forbidden accessing your site so presumably you have some geo blocking in place?

      Please would you post your URL, superuser id and pswd in the secure tab of your post and I'll have a look for you.

      You need to tell mne the three modules you determined were causing the issue.


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 320
    • Thanks: 13
    • Another Old Hack!

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • MrT,

      I have disabled all Admin Tools so there should be no issue in viewing/accessing the site from your location. I have attached the credentials.

      The three modules I disabled were all Random Image modules. You can view the modules by filtering on Random Image type.
    • Just another old hacker!
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • Ok I do notice that your PHP memory limit is rather low at 64M - so please increase this to at least 128M. But that probably isn't going to fix the issue.

      I think you're going to have to ask the developer of that extension for assistance. I agree that is is that extension causing Gantry to break... perhaps they have a new version that is compatible with J3.8.8?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Biller's Avatar
    • Biller
    • Jr. Rocketeer
    • Posts: 30
    • Thanks: 0

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • ive got theexact same problem on my anacron site. only the HOME page gets the error. everythign else works.
      how did u solve ur problem @ Luke Douglas?

      since i see ur site is online again

      // i tried the "fix" on those php files already as u did an have the ERROR 0 on home Site now too.
    • Last Edit: 5 years 10 months ago by Biller.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Joomla 3.8.8 update - Error: 0 - Using $this when not in object context

    Posted 5 years 10 months ago
    • It's caused by a third-party extension called "random image" so those modules that use that have been disabled for now.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.059 seconds