I have had the views_load_more module enabled on my site for some time. It is incorporated into a number of Views.

If I disable the module, the entire site crashes with this error:

PHP Fatal error:  Call to a member function use_pager() on a non-object in /mnt/www/html/dev/docroot/sites/all/modules/views/includes/view.inc on line 690

The site becomes available again only if the module is re-enabled.

Comments

grasmash’s picture

Removing views_load_more pager from all views avoids this problem, but I still fee that it should be addressed.

ericduran’s picture

Hmm, I guess when you disable the module I can go and change all your views but I'm not sure what would be ideal.

grasmash’s picture

Rather than going that far, it may be a good idea to simply add an 'are you sure' stup and display a warning that lists the Views that use the views_load_more pager.

aryashreep’s picture

Try to run UPDATE.PHP(http://sitename.com/update.php). It will solve your problem.

funana’s picture

Try to run UPDATE.PHP(http://sitename.com/update.php). It will solve your problem.

Unfortunately I can't confirm that.

Fatal error: Call to a member function use_pager() on a non-object in /usr/www/users/me/profiles/panopoly/modules/contrib/views/includes/view.inc on line 690

I would expect the module to change the views to a default full pager. If not, than at least what madmatter23 said

display a warning that lists the Views that use the views_load_more pager.

Edit: Actually I am not able to find a view that still contains the views load more pager. I opened all of my views, searched for it. How to find it?

Edit 2: Okay, that was stupid (facepalm). Once you deactivate the module, of course the views don't show it anymore in the pager section. Re-activate and you will find the pager in the views.

funana’s picture

Issue summary: View changes

wrapping error in tags

m4olivei’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Humm, so this error occurs because the defined view is dependant on views_load_more. Views doesn't have a good way to fallback when the pager plugin goes away and you get this error. I think the best thing to do here is to get the view into code, via a feature and then that feature will have views_load_more as a dependancy, which won't allow views_load_more to be disabled unless the feature module is disabled.

Not sure there is a good way to do it from views_load_more. Is there another module that provides a views pager plugin that handles this better?

Reopen if there is still interest.