1
comegona
Suddenly a blank page
  • 2004/7/10 12:33

  • comegona

  • Not too shy to talk

  • Posts: 165

  • Since: 2003/11/9


All of a sudden I'm getting a blank page on the index page and every other page. I was able to turn on debug mode and got the following errors:

Quote:

Fatal error: Call to a member function on a non-object in /home/broadca/public_html/modules/system/blocks/system_blocks.php on line 339
Notice [PHP]: Constant _SB_STOCKBOX_TITLE already defined in file modules/stockquotes/language/english/blocks.php line 14
Warning [PHP]: main(../../../mainfile.php): failed to open stream: No such file or directory in file modules/stockquotes/blocks/stockbox.php line 3
Warning [PHP]: main(): Failed opening '../../../mainfile.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in file modules/stockquotes/blocks/stockbox.php line 3
Notice [PHP]: Undefined variable: xoopsUser in file modules/stockquotes/blocks/stockbox.php line 20


I renamed the module stockquotes and got just the following error
Quote:
Fatal error: Call to a member function on a non-object in /home/broadca/public_html/modules/system/blocks/system_blocks.php on line 339


I turned debug on by going directly to the DB.

2
Stewdio
Re: Suddenly a blank page
  • 2004/7/10 12:51

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


You may need to remove the block from showing on your site. It looks like a module specific problem. You can do this through phpMyAdmin and looking for where the call to the block is being made and delete that call. Renaming the folder will not remove the instances from your DB so you may need to do some pruning.

You might be able to log into your site by going to www.yourdomain.com/user.php and then you can go into the admin by going to www.yourdomain/admin.php

I suggest removing the offending module and looking up the authors sites or comments on suggestions on how to fix it, if it is fixable at all.

Also, it is likely this module was writen for an earlier version of XOOPS that is no longer supported.

3
tl
Re: Suddenly a blank page
  • 2004/7/10 13:01

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Line 339 is related to comments. Your comments table could be corrupted. Try to open the comments table directly using phpmyadmin.

4
comegona
Re: Suddenly a blank page
  • 2004/7/10 13:04

  • comegona

  • Not too shy to talk

  • Posts: 165

  • Since: 2003/11/9


Tried to get in using user.php and admin.php but I still get a blank page. Is there a way of disabling this module directly from the DB?

5
tl
Re: Suddenly a blank page
  • 2004/7/10 13:09

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Quote:

comegona wrote:
Tried to get in using user.php and admin.php but I still get a blank page. Is there a way of disabling this module directly from the DB?

modules table
change isactive from 1 to 0

6
comegona
Re: Suddenly a blank page
  • 2004/7/10 13:41

  • comegona

  • Not too shy to talk

  • Posts: 165

  • Since: 2003/11/9


Quote:
modules table
change isactive from 1 to 0


Did that and the errors still come up about Stockquotes.

I also checked the comments table and they look fine. I can read all comments without any problems.

If it is a Comments issue, I had placed the System comments block on the main page for Webmasters. If this is the cause is there a table where I can disable this block?

7
Mithrandir
Re: Suddenly a blank page

This is not a comments issue.

Line 339 tries to access a module object, but apparently that object is not instantiated, i.e. it is not found in a query fetching all modules (active or inactive) which have comments.

Is Stockquotes your own module? Have you experimented with comments? e.g. enabled comments in the module, added a few comments and then removed the comments support from the module again?

Alternatively, try this:
//Original code
$mid $comments[$i]->getVar('com_modid');
$com['module'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/">'.$modules[$mid]->getVar('name').'</a>';

//Replace with
$mid $comments[$i]->getVar('com_modid');
if (!isset(
$modules[$mid])) {
   
$offending_module =& $module_handler->get($mid);
   echo 
"This is the offending module: ".$offending_module->dirname();
}
$com['module'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/">'.$modules[$mid]->getVar('name').'</a>';


This should display the name of the "bad" module

8
comegona
Re: Suddenly a blank page
  • 2004/7/10 13:53

  • comegona

  • Not too shy to talk

  • Posts: 165

  • Since: 2003/11/9


OK
I got it working.

I disabled 'Recent Comments' by turning xoops_newblocks.visible to 0.

Thanks for all the help.

Site is now back up.

9
comegona
Re: Suddenly a blank page
  • 2004/7/10 13:57

  • comegona

  • Not too shy to talk

  • Posts: 165

  • Since: 2003/11/9


Quote:
Is Stockquotes your own module? Have you experimented with comments?


No its not my module. I found it on XOOPS and it so far works fine but when I put PHP DEBUG on I get the following:
Quote:

Notice [PHP]: Constant _SB_STOCKBOX_TITLE already defined in file modules/stockquotes/language/english/blocks.php line 14
Warning [PHP]: main(../../../mainfile.php): failed to open stream: No such file or directory in file modules/stockquotes/blocks/stockbox.php line 3
Warning [PHP]: main(): Failed opening '../../../mainfile.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in file modules/stockquotes/blocks/stockbox.php line 3
Notice [PHP]: Undefined variable: xoopsUser in file modules/stockquotes/blocks/stockbox.php line 20


10
Mithrandir
Re: Suddenly a blank page

seems to be a miscoded block code.

edit: Downloaded it and looking at it now.

Login

Who's Online

152 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 152


more...

Donat-O-Meter

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

Latest GitHub Commits