Elxis CMS Forum

Extensions => Templates => Topic started by: rentasite on July 12, 2007, 00:26:36

Title: Fatal Error after Template Installation
Post by: rentasite on July 12, 2007, 00:26:36

Hi. I get a Fatal Error after a template's installation. It has been a long time since i got such an error. I must say that the template comes together with a mod.

The error says:

Fatal error: Call to a member function on a non-object in /home/grsinger/public_html/modules/mod_shep.php on line 34

and that part of code where the error is making the mess is:

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
global $mosConfig_live_site;

$button         = $params->get( 'button', '' );
$button_pos      = $params->get( 'button_pos', 'left' );
$button_text   = $params->get( 'button_text', _SEARCH_TITLE );
$width          = intval( $params->get( 'width', 20 ) );
$text          = $params->get( 'text', 'Instant Search' );
$set_Itemid      = intval( $params->get( 'set_itemid', 0 ) );
$clickresults    = $params->get( 'clickresults', 'Click a result' );


any help plz? :-[ ::)  I can send via email, the mod file.
Title: Re: Fatal Error after Template Installation
Post by: rentasite on July 12, 2007, 09:30:27

 ???
Title: Re: Fatal Error after Template Installation
Post by: CREATIVE Options on July 12, 2007, 11:54:50
Remove the module parameters from the template if you can.
Or debug the module & the template for not compatible variable.

Elxis FAN.
Title: Re: Fatal Error after Template Installation
Post by: datahell on July 12, 2007, 12:53:32
What does line 34 says in file mod_shep.php? The problem is there. An object does not initialize and that's most probably because either does not exist or there is another error above that.
Title: Re: Fatal Error after Template Installation
Post by: rentasite on July 12, 2007, 13:54:05

Line 34 says

$button         = $params->get( 'button', '' );


As Sirigos said, i was thinking of removing the module parameter from the template code.
Title: Re: Fatal Error after Template Installation
Post by: datahell on July 12, 2007, 18:22:20
Ok, then the problem is that the $params object does not initialize. You must look higher in the script or to the file that includes this file why this is happening. Maybe a global $params; declaration is enough to solve the problem. I can not know if I dont see it.