Hello,

I am recurrently having this error:
PHP Fatal error: Call to a member function get_handlers() on a non-object in /sites/all/modules/views/includes/view.inc on line 372

I was getting it with the 6.2.8 Views module. So I updated to the 6.3.0a2 and I'm still having this error.
By recurrent I mean every 10min. The only thing that "fixes" (very temporarily) this issue is flushing the cache. So I have a CRON flushing the cache every 5min. Which is not an option.

It occurs on the homepage. I have 4 blocs of content which are all themed using styled files in the main theme folder. Nothing special. All cached to speedup the page loading.

Thanks in advance for your help.

Sorry for the double post with: Fatal error: Call to a member function get_handlers()

CommentFileSizeAuthor
#8 Views exported from 6.x-215.25 KBteebo
#2 All 3 views exported24.37 KBteebo

Comments

dawehner’s picture

I think making a new issue was fine. This is a total different problem

1) Can you please export your view?

Its important to be able to reproduce the problem. Without this it is nearly impossible to fix the issue.

teebo’s picture

StatusFileSize
new24.37 KB

Thanks for the quick response.

I'll put the 3 views in a txt file.

Exported from 6.3 ... do you need a 6.2.8 export?

dawehner’s picture

Here it works fine, beside the nid_php field, because i don't have installed this module, i guess its http://drupal.org/project/views_customfield

Can you try out make a view which has only views core stuff included? I guess this could be caused by veiws_customfield.

Are you using the form module?

teebo’s picture

Thanks for your help.

How are you testing?
On a local machine, with no visits... it works. But on the production serveur with thousands of visits, that's when it bugs.

Which form module? Webforms?

dawehner’s picture

teebo’s picture

Nope, form module is not installed.

teebo’s picture

I changed the cache lifetime. Putting it to 5min. The error occurs a lot less but it's still there.

teebo’s picture

Version: 6.x-3.0-alpha2 » 6.x-2.x-dev
StatusFileSize
new15.25 KB

I have removed veiws_customfield from all my views and the error still occurs.

I downgraded back to 6.x-2.x-dev and the error also occurs.

Here is the views export.

teebo’s picture

Hello,

No progress on this? Drupal.org is having the same issue...

merlinofchaos’s picture

Uh. When you say 'drupal.org is having the same issue' you seem to be talking about an issue over a year old that's been fixed. If it were still having this issue a year later, I'm pretty sure they would've removed Views by now. That issue was also during the editing process, and this is completely different. So those issues are categorically unrelated.

On this issue, the problem seems to be that, for some reason, the display handler is not being created and then when _init_handlers() is called, there isn't a display handler. Without the ability to reproduce this, there's no way to guess why this might be happening. It's particularly weird that it seems to be related to caching, though. It makes me wonder if you've got some module that's doing things strangely, and they work most of the time; but fails when part of the cache needs to be regenerated, and that failure gets cached?

dellis’s picture

I seem to be getting this error message as well...
PHP Fatal error: Call to a member function get_handlers() on a non-object in /var/www/vhosts/mysite/httpdocs/sites/all/modules/views/includes/view.inc on line 372

I have several RSS feeds--with a couple of the feeds I'm dynamically (calling the appropriate content from the database each time the page is loaded) adding the first <item> in views-view-rss.tpl.php file--because it is coming from a different content type (it is an audio sponsorship message--and I have different audio sponsorships for each feed). For any feed with such a sponsor, once the feed is loaded (I'm guessing that means, once it is cached) the next attempt to query the feed results in a server 500 error in the feed validator (http://feedvalidator.org/) --and from then on (until I clear the cache) it starts triggering this "php fatal error" and it says it cannot connect to the server. I should add that my non-sponsored rss feeds work perfectly (regardless of whether they have been cached--and even when the sponsored feeds are misbehaving).

I think what I really would need is a way for this view "not" to be cached... any ideas would be a huge help.

dellis’s picture

Any suggestions would be a big help. I'm still having the problem, and it definitely seems to be a caching issue. I've now seen this on a non-sponsored view.

So to summarize:

1) Using a custom views-view-rss.tpl.php file to add results from a db query to the head of the feed
2) First time testing the feed with a feed validator, it works
3) Second time testing the feed with a feed validator, it fails and gives this (line 372, get_handlers() on a non-object) error.
4) Clearing the Cache allows me to validate the feed again (one time--before failing again the second one)

dellis’s picture

Well, it is definitely a cache thing, but I have no idea whether it is a views or drupal issue. I installed the cacheExclude module, and included all of my feed paths and don't get the internal server error issue anymore. Hope that helps someone.

http://drupal.org/project/cacheexclude

iamjon’s picture

Status: Active » Closed (fixed)

I'm going to mark this as fixed as a work around was provided.
Please reopen if you you are still experiencing difficulty with this issue.

yan’s picture