Fatal error: Call to a member function getInstance() on a non-object

Whenever I edit the page, only blocks that I edit are saved... everything else is erased. I also get a number of errors, the most common being:

Fatal error: Call to a member function getInstance() on a non-object in [rootpath]/concrete/libraries/database_indexed_search.php on line 137

Sometimes there are no errors, but the problem persists. Whatever blocks I don't edit on a page are cleared when I save a page. Restarting the site from scratch isn't really an option because there are hundreds of pages and this was a year in the making with filling all the content and such.

I've reinstalled Concrete5 several times and even recreated the whole website at a different location with the SQL dump. Nothing seems to help. This is a huge issue. I'm freaking out...

It all started after I upgraded from (I think it was) 5.3.3 to 5.4.1.1.

If anyone knows what might be wrong... not just to get the error to go away, but to make it so I can edit blocks without the fear of everything else disappearing!!

Extra notes: it seems to happen when I edit any block. I haven't tried every block, but it's happened with the Content, HTML, Image, Area Splitter and Slideshow Blocks. It happens on every page. I've been messing with this for hours. Every great once in a while, a page will actually save correctly. Like 1 in 25.

Did you clear the concrete5 cache after updgrading (Dashboard -> Sitewide Settings)? And how exactly did you run the upgrade -- automatically via the marketplace, or did you copy up the files to your server via FTP?

Hi. If anyone who is having this problem doesn't mind sending me their FTP and C5 login info, I'd be happy to take a look and see if I can tell what's going on (hopefully I could find a solution and it would be applicable for everyone else having the problem as well).

If you'd be interested in helping out in this way, send me a PM, or email me directly at [email protected]

hi guys, i resolving this problem by restore my db before i refresh schema or instal some block.
and somehow the error is gone. i assume there is something/issue with refresh schema that use adodb.
i hope this solve your problem too.
thanks.

I also received an error message when I was revising the content of my home page.
Fatal error: Call to a member function query() on a non-object in /home2/sherrien/public_html/aawpa/updates/concrete5.4.1.1/concrete/models/user.php on line 177

Are you sure this is a Concrete5 Installation? I take it, someone else
designed your site? Do you mean that this code actually appears when you
visit your website in a browser, or do you mean that you opened up a file on
your server (FTP) and this was the code contained?

Why? Because we live in an imperfect world and no human being (or group of human beings) is capable of writing bug-free code. Sometimes things slip through the cracks and it's better to make your code more "durable" and able to deal gracefully with bad input. Especially when you're talking about a system that serves as a platform for many other people to build sites on, extend, and modify.

Thanks jordanlev - and apologies for my curt message as I fear I may have given you the idea that I was complaining - which I am definitely not. I'm more curious if anyone might have an idea of how these type of bIDs might be getting into the database so that I can perhaps try to fix this and help out. As a programmer myself, I certainly understand the "impecfectness" of it all as I've let a bug or two get by me. I'm a big fan of C5 (and am now using/suggesting it for most of my client's sites) and just want to help improve it.

No worries -- I didn't take it as curt or rude (and wouldn't matter anyway -- it's not my code :)

In addition to just generally being more robust in the event that bogus bID's are passed to it for some unknown reason, I can imagine some scenario where a cache of the site is still referring to a block that has since been deleted from a page. (Maybe?)