0

I'm trying to upgrade Joomla 2.5.22 to 3.5.1, and last time I checked the progress bar, it was 86 %. I looked away for a moment and when I came back to check I saw the below error message.

Fatal error: Class 'JParameter' not found in /home/mywebsite/public_html/plugins/system/bigshotgoogleanalytics/bigshotgoogleanalytics.php on line 24

What is the cause of this error and how would it be fixed?

demongolem
  • 9,474
  • 36
  • 90
  • 105
Chloe
  • 73
  • 9
  • Possible duplicate of [Fatal error: Class 'JParameter' not found in template/theme/index.php on line xxx](https://stackoverflow.com/questions/19225816/fatal-error-class-jparameter-not-found-in-template-theme-index-php-on-line-xx) – jonasfh Jun 04 '17 at 06:21

2 Answers2

0

Joomla can't find JParameter Class, so you have to use

jimport( 'joomla.html.parameter' );

before using JParameter class

Alagesan
  • 349
  • 1
  • 11
  • `jimport( 'joomla.html.parameter' );` didn't work for me. By the way, Inside `bigshotgoogleanalytics.php` file I even found your statement already at the beginning. This [post](https://stackoverflow.com/questions/19225816/fatal-error-class-jparameter-not-found-in-template-theme-index-php-on-line-xx) solved my issues. Thanks anyway ! – Chloe Jun 02 '17 at 13:40
0

bigshotanalytics is one of those plugins that cause a blank page or, at best, a fatal error when updating Joomla. This is because of its old code. I suggest you move the tracking code to your template. You can also add the tracking code to a custom HTML module (after removing the encapsulating div through an override) and then assign the module to a position in your template (the position should be in the section of the HTML).

Now to answer your question, Joomla no longer uses JParameter - it uses JRegistry instead. So something like:

$jparameter = new JParameter('param1');

Should be changed to:

$jregistry= new JRegistry();
$jparameter = $jregistry->get('param1'); 
itoctopus
  • 4,133
  • 4
  • 32
  • 44