I get this error when I try to revert views that have been exported to a feature. This is causing a serious problem for us as we cannot revert out views to our production system.

My views are in my feature. However when I revert, I get the fatal error. When I do a drush cc all - the error disappears and the view is in list of views. If I do another drush cc all (nothing else) the views disappear from the list (database)

Attached sequence, screen shots and feature.

Screen shot 1 shows the views are not in the list

$ drush fr simplybiz_job_spheres
Do you really want to revert views_view? (y/n): y
Fatal error: Call to a member function delete() on a non-object in /var/aegir/platforms/bc77_stage_20110901/sites/all/modules/contrib/views/views.module on line 1463
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to a member function delete() on a non-object in /var/aegir/platforms/bc77_stage_20110901/sites/all/modules/contrib/views/views.module, line 1463

$ drush cc all
'all' cache was cleared [success]

$ drush fr simplybiz_job_spheres
Do you really want to revert context? (y/n): y
Reverted context. [ok]

Notice above that I'm not asked if I want to revert the views. Screen shot 2 shows the views are now in the list

$ drush cc all
'all' cache was cleared

Screen shot 3 shows the views have disappeared again

Also logged at Panel issue #1264826

Comments

diricia’s picture

Issue summary: View changes

Added a line break

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

It would be definitive kind of cool, if you could try several things.

* update to recent versions of ctools/features/views
* See whether it's still happening in general
* Reexport the view you have there
* Provide a really simple feature to reproduce the problem. Sadly this one isn't valid utf8 so it's not possible to open the file.

This error happens if the view object couldn't be initialized and then really something big is broken.
Perhaps it should be considered to move this issue to features as well.

mrfelton’s picture

Sounds like the problem in #1264826: revert views calls views delete() & throws a fatal error which was resolved by upgrading Views to the latest -dev code.

dawehner’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks for finding the duplicate!.

Status: Fixed » Closed (fixed)

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

tim.plunkett’s picture

Status: Closed (fixed) » Closed (duplicate)
tim.plunkett’s picture

Issue summary: View changes

Added explanation