Two attempts at updating 7.19 to 7.22 have resulted in white screen with the following message:
"Fatal error: Call to undefined function ctools_include() in ../sites/all/modules/views/views.module on line 62"

All modules were up-to-date when this was attempted, and there were no problems with the site.

This issue potentially relates to Drupal core and core updates, and am not entirely sure if this is correct place to post it, or if it might be a support question?

Comments

marcingy’s picture

Project: Drupal core » Chaos Tool Suite (ctools)
Version: 7.22 » 7.x-1.x-dev
Component: other » Code
SandPond’s picture

Version: 7.x-1.x-dev » 7.x-1.3

Actually, the installed version of Chaos tool suite (ctools) is 7.x-1.3.

merlinofchaos’s picture

Hm. That means ctools_include is being called in an odd situation when ctools.module has never been loaded. That should be pretty rare. And Views declares a dependency on ctools.module so honestly this situation should never happen.

I'm not convinced this isn't a Drupal core bug.

Can you reliably reproduce this?

FareThoughts’s picture

I can't exactly reproduce this, but I can tell you that I'm looking it right now on my own site, which was bricked.

Fatal error: Call to undefined function ctools_include() in ../sites/all/modules/views/views.module on line 62.

Thankfully, I was able to revert my site back to the previous version of Drupal, which will then grumps at me because I don't have the latest one.

SandPond’s picture

Merlinofchaos:

Thank you sincerely for your interest and support. It is sometimes difficult to know which category to file an issue under.

This issue is SOLVED!

Initially our site was installed using the DrupalWiki distro. We chose not to use most of the wiki functionality, so I communicated with the maintainer of the distro who said it was OK to update drupal core separately. However, cTools is in "profiles/drupal_wiki" directory which did not get moved over for the update. cTools was therefore missing.

I found this highly relevant link concerning profiles and issues with modules located the "profiles" directory: http://designhammer.com/blog/how-relocate-modules-and-themes-drupal-inst...

merlinofchaos’s picture

Status: Active » Fixed

Marking fixed as per #5, who is also the OP.

Status: Fixed » Closed (fixed)

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

sparker888’s picture

Has this been corrected?

I'm using 7.22.22 and have tried solving the issue with updated to ctools trying both 7.x-1.3 and 7.x-1.3+2-dev versions to no avail.

I'm still getting a white screen with:

Call to undefined function ctools_include() in C:\Dev_Server\Dev_Sites\sites\all\modules\views-7.x-3.7\views\views.module on line 62

I can provide more info if needed. I'm testing on a local machine running Acquia Dev Desktop (and this is the only site running at this time other than the default site install).

Edit: No modules are running in the profiles directory btw

Thanks!

SandPond’s picture

Sparky888:

I don't know if your situation/configuration is similar to what mine was, but have a look at Reply #5 above.

[1] Have a look in the directories below /profiles to see if any "modules" folders reside there. If your site was orignally installed using a profile you may have overwritten these during your update. Technically, if you follow the prescribed drupal core update procedure, this should not happen (http://drupal.org/taxonomy/term/34882). Unfortunately, some of us (including me) take short-cuts which, although seem logical, may have unforeseen consequences under certain conditions. Live and learn!

[2] If your server is running cPanel you should check the /tmp directory to see if extracts from update archives are being trapped via the firewall Directory Watching feature. You may find some files there that resemble the module install archives involved. You can also determine if Directory Watching is creating problems by checking the "var/log/lfd.log" log files for errors which include the string "Suspicious File". Just "grep 'Suspicious File' /var/log/lfd.log*"

To check your "Directory Watching" status, login to cPanel WHM, and go to:
ConfigServer Security & Firewall/csf - ConfigServer Firewall/Firewall
Configuration/SECTION:Directory Watching & Integrity
LF_DIRWATCH = 300

Change "300" to "0" to disable directory watching.

[3] Other firewall and security measures may also cause this or similar problems.

[4] Sometimes turning off all of the performance caching options and flushing all caches prior to updating can help. Although, this should not normally be necessary.

Regardless of whether you find problems in /tmp or lfd.log, you may have to restore your site to an older version in order to correct or debug the problem.

If the solutions above do not apply to your particular situation, have no fear. Drupalers are the absolute best! I am sure someone in the community with better skills will step and help you.

Drupal may best be maintained with Drush.

sparker888’s picture

Thank you Sandpond.

In going back in I've noticed that Acquia does indeed add modules under the profiles.

They use to have these under sites/all/modules/acquia, but apparently that has changed.

I'm not sure if I should move them now, and if so, to where?...

On our production site, the watchdog table is hosed. We cannot even read it directly now (it's appears to be corrupted and the mysqld log complains about it when it starts), and accessing the admin section is impossible due to the white screen.

Grrrr..why does this have to be so complicated? I moved to Drupal to simplify things.../rant

I'll update when I get to a resolution. At this point I'm thinking of rebuilding from scratch..perish the thought.

However, I cannot drush cc, rr, or even get a status at this point...getting DrupalDefaultEntityController errors...apparently something went very wrong during the upgrade.

SandPond’s picture

You simply need to protect those directories during core updates (or follow the core update procedure correctly). As for Drupal, it's 5 times as difficult to comprehend, but 10 times better and more advanced than other opensource CMSs.

Drupal core and contributed modules are maintained centrally by high-end maintainers in a much tighter and safer way that WordPress or Joomal.

These are just my opinions of course.

Drupal has a very steep learning curve. It employs somewhat abstract, but exceedingly efficient concepts. If you are not a bit of a web guru you may be in over your head. A video that is well worth watching, and that will help you understand this is: http://www.youtube.com/watch?v=XgYu7-DQjDQ

As for your issue, restore a site backup made previous to the problem you encountered. If you don't have such a backup, you have just learned a valuable lesson!

Also, this is not the forum for Acquia. They have their own support forum, moderated by Acquia folk, which is very good. You would probably get answers quicker there. Most of us have no idea about Acquia configurations and installation profiles. If no luck, then you might try here as a last resort.

sparker888’s picture

Thanks again Sandpond. I've been working with Drupal for many years though. ;)

dmeyerson’s picture

Hi I'm having the same problem and still not sure how to fix it after reading this thread.

Someone correct me if I'm wrong. My understanding is that this problem comes from views.module calling ctools_include() before ctools_include() has been loaded. And ctools_include() HAS been loaded, but just from an extra copy of the ctools module that lives in the wrong part of the file system. And to fix the issue, I have to find that extra copy od ctools and delete it. Is that right? Or does anyone know what I'm missing?

Mirroar’s picture

Issue summary: View changes

Depending on your server configuration this could also stem from your webserver not having correct access rights to ctools' files. This happened to me after updating via drush and forgetting to change the files' owner to the apache user.

philsward’s picture

Ran into the same problem tonight moving from ctools 1.3 -> 1.4

I disabled views (and all dependencies), then received the same notice for the quicktabs module. I disabled quicktabs and didn't receive any more drush errors, so I decided to re-enable views. Here's where it gets interesting:

drush en views
The following extensions will be enabled: views, ctools
Do you really want to continue? (y/n): n

Why was ctools disabled?!?? As you can see, I choose not to enable both modules and instead enabled ctools by itself...

drush en ctools
The following extensions will be enabled: ctools
Do you really want to continue? (y/n): y
ctools was enabled successfully.

Hum... So apparently the error was being caused from ctools being disabled... Further inspection of ctools from the /admin/modules page (finally able to pull it up) showed that ALL of the ctools plugins were also disabled...

So, if you run into this error and you don't have the profile issues mentioned above, look into ctools being disabled. Since I worked backwards to figure this out, I'm not sure if simply enabling ctools would work or if you'll have to enable it via the database.

SandPond’s picture

See the solution in Comment # 5 above, "cTools was therefore missing". Whether cTools is missing or disabled, this seems to be the basis (or least one of them) for this error.

philippejadin’s picture

What fixed it for me :

disable views : drush dis views
clear all cache : drush cc all
re-enable views : drush en views

You need drush for this kind of stuff:-)

chriscalip’s picture

error sighted, in my case i saw on system table that ctools status is 0
updated to enabled, did registry rebuild.

kochertj’s picture

Regarding comment #17, I could not even run any kind of Drush commands due to this error. I had to...

  1. Create a backup of views.module.
  2. Comment out every reference to an undefined function in views.module, then try running 'drush cc all' (several iterations of this). Line 62 of views.module was not the only line calling an undefined function.
  3. Then I was able to disable views : drush dis views
  4. Enable Ctools: drush en ctools*
  5. Clear all cache : drush cc all
  6. Restore views.module from the backup.
  7. Re-enable views : drush en views.

At that point the error was gone and Drush was working again.

lemac889’s picture

I set the right of the element into tools to 755 and apply that to Enclosed and my site is now working, thanks the #14.

kjckfdo’s picture

"Fatal error: Call to undefined function ctools_include() in ../sites/all/modules/views/views.module on line 62"

I have remove the */ on line no 59

its work for my site on wamp server

thanks

aerozeppelin’s picture

I was facing the same issue, steps in #18 worked for me.

Rafal Lukawiecki’s picture

Just had a similar issue, #18 still works well.

vishal.sirsodiya’s picture

I am facing same issue in localhost, when I configure my live site code in localhost.

Fatal error: Call to undefined function ctools_include() in ..\sites\all\modules\contrib\context\context.module on line 537