Welcome, Guest
Username Password: Remember me

Fatal error after installing mobile joomla in joomla 1.5
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Fatal error after installing mobile joomla in joomla 1.5

Re: Fatal error after installing mobile joomla in joomla 1.5 13 years ago #6223

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Are you sure you use J1.5.24? Because of it's the source of JPlugin::__construct
if ( isset( $config['params'] ) ) {
    if(is_a($config['params'], 'JParameter')) {
        $this->params = $config['params'];
    } else {
        $this->params = new JParameter($config['params']);
    }
}
Last Edit: 13 years ago by dryabov.

Re: Fatal error after installing mobile joomla in joomla 1.5 13 years ago #6235

  • doorknob
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Yes, definitely using 1.5.24.
I checked my version of JPlugin and it definitely includes the code as you say.
I wonder if this is a PHP version issue. The syntax used for the Always plugin is the old PHP4 style which was deprecated in PHP5 but still supported (and needed for compatibility with dinosaur sites). I'm now using PHP5.3. It's more streamlined than 5.2 and is faster so maybe it doesn't support the PHP4 structure any more?

Edit: I updated Always.php and changed the name of the 'plgMobileAlways' function to '__construct', removed the extra line I inserted and it worked fine. Definitely a PHP compatibility issue.
Last Edit: 13 years ago by doorknob. Reason: More info

Re: Fatal error after installing mobile joomla in joomla 1.5 13 years ago #6245

  • doorknob
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
I finally figured it out.
It's nothing to do with PHP5.3.

When the extension is first installed, the entries for each of the plugins are made in the jos_plugin table with the value of the params column set to null. When JPlugin loads a plugin, it only creates a params property if the value passed in $config is not null. When the plugin has been edited in the backend (or just saved without any change to the settings), the value of the params column is set to a value and the params property is created correctly. A short term fix is to open all of the plugins and click the 'save' button to populate the params column in the jos_plugins table. A proper fix will be to cater for the possibility of this occurring and allow for it. What worked for me was changing
		parent::__construct($subject, $config);
 
to
		parent::__construct($subject, $config);
if (!isset($this->params)) {
$this->params = new JParameter(null);
}
 
in each of the plugins

Re: Fatal error after installing mobile joomla in joomla 1.5 13 years ago #6248

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Thank you for investigation and explanation, we will add this patch to 1.0RC5.
  • Page:
  • 1
  • 2
Time to create page: 0.33 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.