1
Cozzie
notifications.php not working
  • 2009/3/16 11:23

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Hi there

My notifications.php has stopped working not sure when it happened or why.

The page notifications.php won't load. Debug gives this:


Fatal error: Call to a member function getVar() on a non-object in /home6/howtwouk/public_html/notifications.php on line 96

Line 96 of notifications.php is this:

$modules[$modid] = array ('id'=>$modid, 'name'=>$module->getVar('name'), 'categories'=>array());

Don't know how to fix this (sorry!), can anyone help me?

Thanks a lot

2
Catzwolf
Re: notifications.php not working
  • 2009/3/16 12:36

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Which version of XOOPS are you using?

3
Cozzie
Re: notifications.php not working
  • 2009/3/17 1:09

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


sorry, should have said, its 2.0.18

4
Catzwolf
Re: notifications.php not working
  • 2009/3/17 3:07

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Np :)

From what I can see, the notification it looking for a module that could have possibly have been un-installed or deactivated.

To get around this you could modify the code at these lines:

$module =& $module_handler->get($modid);
$modules[$modid] = array ('id'=>$modid'name'=>$module->getVar('name'), 'categories'=>array());


To This:
$module = &$module_handler->get$modid );
if ( !
is_object$module ) ) {
   continue;

$modules[$modid] = array ( 'id' => $modid'name' => $module->getVar'name' ), 'categories' => array() );


Be aware, I am not 100% that this will not have any side effects, but it should kill the error and allow you get back into that page.

Catz

5
Cozzie
Re: notifications.php not working
  • 2009/3/17 3:31

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Thanks a lot Catz!

I've just realised what the problem is. I was logging in and out of the site between 2 users. If I just login as the one user on one computer, notifications.php works fine.

In case users of the site also register more than account (which they switch between) is there a way to enable the notifications.php to still work for them (is the above change still worth doing?)

Thanks a lot for your help!!!

6
Catzwolf
Re: notifications.php not working
  • 2009/3/17 3:57

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


lol np :)

And the answer would be yes, it will stop you getting an error.

Login

Who's Online

212 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 212


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits