After updating the modules to:
calendar 7.x-3.0-alpha2+4-dev (2012-Jan-21)
Chaos tool suite (ctools) 7.x-1.0-rc1+115-dev (2012-Jan-22)
date 7.x-2.0-rc1+76-dev (2012-Jan-22)
jquery_update 7.x-2.1+7-dev (2012-Jan-18)
Localization update 7.x-1.0-beta2+27-dev (2012-Jan-22)
Link checker 7.x-1.x-dev (2012-Jan-20)
Migrate 7.x-2.2+82-dev (2012-Jan-18)
Profile 2 7.x-1.2+1-dev (2012-Jan-16)
Views 7.x-3.1+19-dev (2012-Jan-22)

I get the error-message:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?render=overlay&id=1132&op=do StatusText: parsererror ResponseText: Fatal error: Call to undefined function _views_prepare_handler() in xxxxxxx\sites\all\modules\views\views.module on line 1146

Please help.

#1 1413200.patch920 bytesdawehner
Members fund testing for the Drupal project. Drupal Association Learn more


wusel’s picture

Issue summary: View changes

I add all updated modules

dawehner’s picture

Status: Active » Needs review
920 bytes

I'm not sure when this happens but right this function doesn't include the

Actually i thought there should be always something else which includes the file already.

Here is a small patch.

wusel’s picture

Thanks for your quick responce.

I have added your new line "views_include('handlers');" as line #1098 in "views.module" manually.
Now this patch works fine. Thank you very much!

I will answer in the next days, because I have another issue ( yet.

dawehner’s picture

Status: Needs review » Fixed

Thanks for testing the patch! Committed it to 6.x-3.x and 7.x-3.x

It's kind of intereting when this happens, can you respond to that?

arlinsandbulte’s picture

NROTC_Webmaster’s picture

I got this error after updating the date module and then trying to run the database update. I only saw this specific error one time but either this or the latest patches in the date module fixed another issue I was having trying to run the database updates.

alan mccoll’s picture

I also have this problem and have applied the views_include('handlers');" as line #1098 in "views.module"
Seems to have worked. Thank you so much!

Naturalist’s picture

Woked for me also. I was having this problem across many areas. i.e. saving content types, update.php etc.

Nneka’s picture

Thanks for the fix. I upgraded some of the same modules:

Along with others such as OG, i18n, etc.
This fix remedied my problem. Thanks!

decibel.places’s picture

note - updating to latest 7.x-3.x-dev fixed this problem for me

although the "recommended version" 7.x-3.1 has the views_include('handlers'); line, it still threw the error, intermittently

KentSpiel’s picture

Bug is still not fixed--this happened to me today and I had just run drush pm-update.
views.module still needs the code taken from the patch above:
added to line 1098

arlinsandbulte’s picture

@KentSpiel: Yes, this IS fixed, but has not been released in an official release yet.

Here is the commit:

The latest 'stable' release of Views (7.x-3.1) was released on January 16.
The patch was applied to the git code repository on January 23.
Views 7.x-3.2 WILL have the new code when it is released.
By default, drush pm-update updates to the latest 'stable' version.

Until Views 7.x-3.2 is released, you can either:
1.) Apply the patch to your install yourself
2.) Use the -dev version of Views
3.) Get the latest code from git.

dawehner’s picture

Additional what you could do is to help in the issue queue to bring 7.x-3.2 out :)

rvolk’s picture

I can confirm this issue too in the Drupal update process. My update.php script run into this
Fatal error: Call to undefined function _views_prepare_handler() in /var/www/drupal/src/sites/all/modules/views/views.module on line 1146
while updating my modules.

decibel.places’s picture

seems what's going on here is automatic updating without reading release notes and issue queues

(that's even easier than ever in D7 from the Update tab on the admin modules page)

I posted in #9:

7.x-3.1 has views_include('handlers'); but still throws the error

7.x-3.x-dev (latest version) works fine without the error

since -dev is usually not the "recommended" version of a module, people may be wary about trying it

the past 7 years have taught me -dev often fixes problems, although sometimes causes problems

I wish I knew how to help people avoid these problems

webmaster-eddie’s picture

feb 16 - I had the same problem, ran drush dl views-7.x-3.x-dev, then updated the db - and now the site is down - just a blank white screen with error messagte on the command line of "cannot redeclare views_object in ... /views/includes/ line 11

his is on a multilingual website with many languages installed that translation_overview does not work on - i.e. that I had to disable translation_overview for in order to run cron.

Were there any updates to the dev branch of views-7 today?

Thanks for any help - got to get the site up again and don't know what to do. - its a non-proit site I handle on a volunteer basis to help prevent species extinction ...

Webmaster eddie at

UPDATE - I don't know what changed, but 10 minutes after posting the above, I was able to get the site back online again by running " drush upc" and then "drush updb" - now I can run cron again and update the translations.

I hope to get back to a production version of views that works. It gets crazy with rtl languages and languages using other scripts - thans to the maintainers of views. I'm depending on you, and am volunteering my time for species' survival with theis non-profit site - thanks.

UPDATE 1 hour later - now I've had the same problem - site totally down by updating to the dev version of views on another site that I manage. This one I can't get back online - just a white screen of death. I am using drush so it is downloading all modules to the correct location ... any ideas here on how to solve this? Thanks for any help.

UPDATE - for your information - this site still had the module translation_overview enabled - I have just disabled it and now; with the updated dev version of views, the site is bask up without errors. Please be advised that I have already filed a bug repost with the translation_overview module. Best regards.

UPDATE - on a third site I had to disable apachesolr-media - Apache Solt Media Integration - which has never worked properly for me - in addition to translation_overview to get the site back up since the last views update. For Your INformation.

dawehner’s picture

feb 16 - I had the same problem, ran drush dl views-7.x-3.x-dev, then updated the db - and now the site is down - just a blank white screen with error messagte on the command line of "cannot redeclare views_object in ... /views/includes/ line 11

Could it be that you have downloaded views in two different directories? You know it's so hard that people can break drupal in any kind of possible way.

NoDeity’s picture

I got this error after updating views. After reading the above, I downloaded the views-7.x-3.x-dev archive, extracted the views.module file and just uploaded that into the /sites/all/modules/views directory. I'm not sure if that's a recommended procedure but it seems to have worked.

loopy1492’s picture

It seems to be a problem with views.

Try this. It SEEMS to have worked for me.

Basically, download the and replace the views.module in your all/modules/views folder with the one from that zip and it clears everything up.

This also seems to solve some other errors in Drupal.

I'll keep you posted.

loopy1492’s picture

This resolution is looking very promising. All errors have stopped. I'll let it sit and run until next week before I make a final verdict.

Katrina B’s picture

Looking forward to the release of 3.2.

grozozo’s picture

I had this issue when i upgraded to the new version of date and calendar.
The solution in #1 and #2 functioned. Thx guys!

allio_froggio’s picture

Is anyone else having their site suddenly crash when enabling Calendar?

I had Views and Calendar working for a while, then started getting the error that I was missing a plugin (my apologies, now, I can't replicate the exact error because I cannot enable Calendar without crashing everything).

I though it was perhaps due to older modules, but, I tried it on a completely fresh platform, too.

I've updated as follows:
Views 7.x-3.2+0-dev
Calendar 7.x-3.x-dev
Ctools 7.x-1.0-rc1+116-dev

Does anyone have a combination of these modules that works?

mxh’s picture

#22 - as mentioned above: usually it's not recommended to use dev versions. try the combination with the latest recommended releases.

allio_froggio’s picture

On it! Thanks for the response!

wusel’s picture

@allio_froggio - #22:

have you installed ALL the required modules: Views, Chaos tools, Date in the module path sites/all/modules?

Status: Fixed » Closed (fixed)

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

vivekguptakota’s picture

This is very nice patch.Work on drupal 7.4 also.

vivekguptakota’s picture

Issue summary: View changes

Updated issue summary.