1
bumbum
"Call to a member function on a non-object in"
  • 2005/8/16 16:57

  • bumbum

  • Just popping in

  • Posts: 99

  • Since: 2004/10/18


I've upgraded to 2.2 and the center blocks are missing. When I go to the Admin section and click 'Blocks -> List all blocks' I just get a blank page. With PHP debug on I'm getting the following error message:
Call to a member function on a non-object in mysite/modules/system/admin/blocksadmin/blocksadmin.php on line 58
Anyone know what this means?

Line 58 is as follows:
$block_arr[$block->getVar('mid')]['modname'] = $modules[$block->getVar('mid')]->getVar('name');

2
Mithrandir
Re: "Call to a member function on a non-object in"

It is most likely because of some rogue blocks still being in the database even though the module has been uninstalled.

We've had reports of that happening as well as templates persisting after module uninstallation, but have trouble reproducing it.

For now, I would suggest that you manually look in your database (with phpmyadmin or similar tool) and see if there are records in the newblocks table that have "mid" values that are not present in the modules table. Then delete the records in the newblocks table and see if that corrects it.

We are very interested in getting PHP and/or MySQL debug information from the module uninstallation page from anyone experiencing this bug.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

3
bumbum
Re: "Call to a member function on a non-object in"
  • 2005/8/16 18:55

  • bumbum

  • Just popping in

  • Posts: 99

  • Since: 2004/10/18


hmm,
59 records in newblocks
25 records in modules

Checking the 'mid' values as you said, I noticed a record for clockcalandar in the newblocks table with a mid value of 67 that wasn't in the modules table so I deleted it and hey presto - it worked!
That has put to bed about two weeks of frustration so I can't thank you enough - I wouldn't have found that in a million years!

4
bumbum
Re: "Call to a member function on a non-object in"
  • 2005/8/16 19:01

  • bumbum

  • Just popping in

  • Posts: 99

  • Since: 2004/10/18


If it sheds any light on why this might happen I can tell you that clockcalendar is a block I used for a short while. I updated my default theme (no others available on my site to users) and removed the block. There have been a couple of minor XOOPS updates since and now the 2.2 upgrade.
I've also recently switched host server.
I'm thinking that maybe one of the intermediate versions of XOOPS hasn't dealt with blocks as it should have and led to this???
I don't know - it's just a suggestion for someone who actually KNOWS what they're doing...

5
Mithrandir
Re: "Call to a member function on a non-object in"

You mean that you removed the block module BEFORE upgrading to 2.2?

We've had reports for XOOPS 2.2+ about blocks and templates not being removed when a module is uninstalled, but I simply cannot reproduce it - but yours seems to be a different problem if it is not caused by uninstalling a module under XOOPS 2.2
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

6
bumbum
Re: "Call to a member function on a non-object in"
  • 2005/8/16 19:58

  • bumbum

  • Just popping in

  • Posts: 99

  • Since: 2004/10/18


Yes, it would have been an earlier version of XOOPS 2.0 - probably around 2.0.07 or thereabouts. I got rid if it about 3 months ago.

Login

Who's Online

392 user(s) are online (345 user(s) are browsing Support Forums)


Members: 0


Guests: 392


more...

Donat-O-Meter

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

Latest GitHub Commits