Recent updates breaks our sites with a fatal error. The ctools/includes/ is trying to include a plugin file that got removed with the latest oembed update (file plugins/export_ui/

ctools 7.x-1.2
oembed 7.x-0.1.beta3

[Wed Sep 05 15:49:36 2012] [error] [client] PHP Fatal error: require_once(): Failed opening required '/Library/WebServer/Documents/drupal7/sites/all/modules/oembed/plugins/export_ui/' (include_path='.:/php/includes:/usr/lib/php/Zend/library') in /Library/WebServer/Documents/drupal7/sites/all/modules/ctools/includes/ on line 475

#3 plugin-load-use-include-1775612-3.patch603 bytesbartram
PASSED: [[SimpleTest]]: [MySQL] 121 pass(es).
[ View ]
#2 1775612-calling-missing-file-2.patch1.26 KBianthomas_uk
PASSED: [[SimpleTest]]: [MySQL] 67 pass(es).
[ View ]


merlinofchaos’s picture

This should be fixed with a cache clear.

ianthomas_uk’s picture

Status:Active» Needs review
new1.26 KB
PASSED: [[SimpleTest]]: [MySQL] 67 pass(es).
[ View ]

A cache clear would fix this, but if you're getting a white screen of death then you may not be able to clear your cache, even using Drush.

If we throw an exception instead of letting PHP trigger a fatal error then this will be caught by the default exception handler and you'll be able to clear the cache with Drush. It also gives other modules the chance to handle this error themselves (e.g. hiding the block that the ctools plugin is used in, but showing the rest of the page).

I've attached an example patch of how this could work, as I didn't want to waste time on a complete patch if it would not be accepted. Worth noting is that this patch only catches one of at least two instances of require_once that we'd want to handle, and it uses PHP's generic Exception class rather than a more specific exception. I'd be happy to make these changes if such a patch would be accepted (any suggestions for what Exception should be thrown?).

Drupal 8 core plugins already throw exceptions, but the messages are being improved in and

bartram’s picture

new603 bytes
PASSED: [[SimpleTest]]: [MySQL] 121 pass(es).
[ View ]

This issue also occurs for me when switching between branches on other modules, where one branch has defined a plugin, and the other branch is a few commits behind. When switch back to the old branch, I get the WSOD, and I am unable to clear my cache, even with Drush.
Is there a reason for using 'require_once' instead of 'include_once'? It's not the end of the world if the file doesn't exist, but 'require_once' acts like it is. The function name ('ctools_plugin_load_includes') suggests that the module should use 'include_once'.
Here's a patch. If the file goes missing, I can still clear my cache, and ignore any errors that show up.

John Bickar’s picture

I ran into this when moving module files around (from a subdirectory in "profiles" into sites/all/modules).

Truncating the cache table manually allowed me to clear the cache with drush:

drush sqlq 'truncate table cache'
DamienMcKenna’s picture

Version:7.x-1.2» 7.x-1.x-dev
Issue summary:View changes

pwiniacki’s picture

got this when updating commerce _shipping module from version x.1 to version x.2:

Fatal error: require_once() [function.require]:
Failed opening required '/home/sites/all/modules/commerce_shipping/plugins/quotes/quote_base/'
(include_path='.:/usr/local/php/p53/lib/php') in /home/sites/all/modules/ctools/includes/ on line 475

So just clearing cache fix this issue?

EDIT: related -

DamienMcKenna’s picture

@pwiniacki: Please heck with the commerce_shipping module, there should be some documentation on how to update from one version to another.

pwiniacki’s picture

@DamienMcKenna thanks, I already did before making any post here. On my localhost everything is fine, on live I get error above.

EDIT: I did try to update my live site again - no error this time. But error appear on my localhost test page :) So I guess this will be very hard to target - random error :P

DamienMcKenna’s picture

@pwiniacki: I mention that because your issue has nothing to do with this issue in CTools, you really should open a new "support request" issue for Commerce Shipping.

pwiniacki’s picture

@DamienMcKenna ok got it, thanks for you support, every help is appreciated.

Anyway If somebody got similar problem - when you disable rule Commerce Shipping Example plugin
Machine name: commerce_shipping_example_plugin

your chance to upgrade without error are higher but this error can still randomly appear.