Just updated to the latest dev version and now can not use my site because I am getting this error.

Fatal error: Call to a member function override_option() on a non-object in /usr/home/WESTENDLANE/p.caligari/living_earth/sites/all/modules/views/modules/comment.views_default.inc on line 22

I tried rolling back to the most recent release candidate but am still getting the error. What has gone wrong?!

Comments

abamarus’s picture

I have just done a little echoing of variables and the call

$handler = $view->new_display('default', 'Defaults', 'default');

is returning NULL rather than an object. I hope this helps someone who knows the views module better than I do to work out what the problem is and how to fix it!

abamarus’s picture

OK.... trying to get the site up by commenting out all the views where this issue occurs - and it is in every single module that uses views.

abamarus’s picture

Priority: Critical » Normal

Right... got around this by removing the module, running update.php (this gave me the site back but with loads of warnings)

Then I put the module back and ran update.php again

I lost a lot of the block configuration doing this but at least the site is working now....

Any one have any idea what went wrong and why?

karens’s picture

Did you have the Comments module enabled at one point and later disable it? If so, it might be related to #292395: Error Message: has_path() on a non-object... where a display handler is missing if the module that defines it is disabled. Removing Views completely and reinstalling would have fixed it because the second time the Comment module would have been disabled from the beginning, so no problematic displays were entered.

If you could confirm that, this might another place that needs a fix like #292395: Error Message: has_path() on a non-object... to fail gracefully if a display handler is missing.

abamarus’s picture

No, Karen - I didn't disable any modules while doing this. I was wondering if the database had become corrupted in some way as I had to go back and install rc1 then update that but I am not that well up on what goes on so that may be completely wrong (and probably is!!)

karens’s picture

I'm not asking if your disabled any modules while doing this, I'm asking if you had the Comment module enabled at any time, ever, and later disabled it.

abamarus’s picture

The comment module has been enabled since I started building the site and has never been disabled.

jody lynn’s picture

I get the error
Fatal error: Call to a member function override_option() on a non-object in ...
from every views_default.inc in my enabled modules. First it was crashing on node.views_default.inc and when I removed that file it crashed on the next default.inc until I removed each one and restored my site.
(I am not using comment module).
I am using the latest dev.
Interestingly the fatal error only occurs on my dev server and not on my local environment. It is triggered by high-memory pages such as admin/build/modules or when adding a new content type or field in cck. Once it is triggered the only way to restore the site has been to delete and then re-import the db. I have 96M of php memory on the dev server and am not having wsod problems when I remove the default views files.

The idea of running update.php in comment 3 didn't do anything for me. abamarus, did you switch to an earlier release to solve the problem?

jody lynn’s picture

Please ignore my post-
My problem was just that I did a bad cvs/svn update and never moved the new plugins folder to my dev server...

abamarus’s picture

@Lyn - I did go back a release then upgraded to the latest again - running update.php at every step though it claimed not to have actually done anything. After doing that everything is fine - though I am not going to do any more upgrades of installed modules - it's all working now!

merlinofchaos’s picture

Status: Active » Fixed

Marking fixed since it's all working now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

fq’s picture

Status: Closed (fixed) » Closed (won't fix)

I get the same error abamarus and Jody Lynn described and have been searching for a way to solve this issue all day. I did try all that has been suggested here, I must say that I'm new to Drupal so my knowledge is limited.

Fatal error: Call to a member function override_option() on a non-object in .../sites/all/modules/views/modules/comment.views_default.inc on line 22

As Jody Lynn explained: «I removed that file it crashed on the next default.inc until I removed each one and restored my site.» . The fatal error appears when I access the administration modules page or update.php.

Does someone have a suggestion on how to fix this? Or is there a module that basically does what Views does? I just need make some node lists, like on the default page but in different sections of my site. Thanks!