Fatal error: Call to undefined function ctools_include() in /home/XXXXXX/public_html/sites/all/modules/services/services.module on line 217

This error also occurs with the last dev version.

Site out.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Title: Fatal Error » Fatal Error: call to undefined function ctools_include()
Project: Chaos Tool Suite (ctools) » Services
Version: 6.x-1.8 » 6.x-3.x-dev

/home/XXXXXX/public_html/sites/all/modules/services/services.module

This is services.module, utilizing CTools API. Perhaps it's not checking to make sure CTools actually exists. During install and update.php it's possible for a module to run without dependencies actually present (unfortunately). Maybe services has to deal with this.

But as long as ctools.module is loaded, ctools_include() will exist, so this can only happen in particularly weird circumstances.

Also, "Fatal error" isn't a very good title for an issue, since it doesn't do a good job of summarizing the issue.

astutonet’s picture

Ok

For now, thanks for the tips and instructions. I'm learning ...

However, even with the development version of Services module available today (28), I keep getting the same fatal error message.

I also tried with version 2.4 and got the following error message:

Fatal error: Call to undefined function ctools_include() in /home/xxxxxx/public_html/sites/all/modules/panels/panels.module on line 1100

Now with version 3.0 beta2, the message is as follows:

Fatal error: Call to undefined function ctools_include() in /home/xxxxxx/public_html/sites/all/modules/services/services.module on line 341

The site goes off the air.

Thanks for the help.

astutonet’s picture

Hello

I tried make the site will function again, using the development version of Services module, released today, 29, but the update failed, as we can see at the message below:

Fatal error: Call to undefined function ctools_include() in /home/xxxxxx/public_html/sites/all/modules/services/services.module on line 217

I also tried to restore the services using a development versions a bit older, but keep getting the same error messages.

Important: These errors occur when updating the site through update.php.

The user who accesses the site by typing, for example, the url in any browser, get the following error message:

Fatal error: Call to undefined function ctools_include() in /home/xxxxxx/public_html/sites/all/modules/strongarm/strongarm.module on line 160

I didn't make any update at the module Strongarm. Then I ask them: This error is also of Strongarm, without my having made ​​any changes to it, or is a error of the CTools module?

The site is still out.

Tks.

pillarsdotnet’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
FileSize
873 bytes

Quick hack/workaround to get astutonet back up and running.

Just insert:

  module_load_include('module', 'ctools');

before the line reported in the fatal error message.

The *REAL* problem probably is in a hook_boot() implementation somewhere, but it's not my module and not my problem and I'm not interested in solving it.

marcingy’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev

Moving to 7.x as this also affects that version. I have what I feel is a better solution which basically adds a module exist check in hook_menu as the call to generate the endpoints in the menu is the root cause of these problems.

marcingy’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Active » Needs review
FileSize
1.55 KB

Patch for the above.

astutonet’s picture

Ok

I inserted the code module_load_include('module', 'ctools'); in line where they had errors.

As I had upgraded Services and CTools modules, I started the system running version 6.x-3.0-beta2 of the Services module. I Ran the update.php and the error message was:

Fatal error: Call to undefined function ctools_include() in /home/xxxxxx/public_html/sites/all/modules/services/services.module on line 341

I edited the file and I did the changes indicated to inserting a new row command. I ran the update.php again, it ran flawlessly until the end.

By accessing the administration page of the system, I received the following error message:

Fatal error: Call to undefined function ctools_include() in /home/xxxxxx/public_html/sites/all/modules/strongarm/strongarm.module on line 160

I edited the idicated file and made ​​the changes to inserting a new command line. I ran the update.php again, it ran flawlessly until the end.

I managed to access the site admin area, but there are still errors, as follows:

warning: Invalid argument supplied for foreach() in /home/xxxxxx/public_html/modules/trigger/trigger.module on line 174.

Note that it is a new type of error and is displayed on all pages of the site, including the content pages.

I use the module "Front" to define the access to a custom page for each available language, which is called "home. " This page is based on views and displays information from the general content of the site in its own language.

These pages are no longer being displayed and the server response is error 404.

Since I never faced problems on this scale, if possible, I would like to receive additional instructions for correcting the mistakes.

Thanks to everyone involved with this problem.

pillarsdotnet’s picture

FileSize
1.11 KB

Another hack/workaround patch.

The problem in #7 should be reported to Drupal core as a separate issue.

marcingy’s picture

Priority: Critical » Normal

Em why have you posted a patch for the trigger module in this issue? #6 provides an appropriate fix for services in that we don't need to/shouldn't build menu items if for some reason ctools isn't enabled. Reducing priority as this is not a normal condition.

astutonet’s picture

The patch for Trigger available at #8 can be applied in versions 6.x? If no, what I can do?

marcingy’s picture

Please open a new issue for the trigger issue against the drupal project as this is confusing this issue which is about a bug in services.

astutonet’s picture

Ok.

For reference, the Trigger issue was opened here http://drupal.org/node/1143174.

Tks

kylebrowning’s picture

Status: Needs review » Fixed

Fixed in 6.x and 7.x

Status: Fixed » Closed (fixed)

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