When I activate a module (not Bean – any other module) Ctools throws this notice. One for each bean type that I've got.

Plugin container of plugin type bean:types points to nonexistent file sites/all/modules/bean/bean_admin_ui/bean_custom.info for class handler handler.

Comments

indytechcook’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

cosmicdreams’s picture

I ran into this with the dev version of the day. But my error message is slightly different:

Plugin bean of plugin type bean:types points to nonexistent file profiles/
/modules/contrib/bean/BeanPlugin.class.php for class handler handler.
Plugin bean_default of plugin type bean:types points to nonexistent file profiles/
/modules/contrib/bean/BeanDefault.class.php for class handler handler.

Indeed these files don't exsit. Should they, and if so, what's trying to call on non-existing files

cosmicdreams’s picture

Status: Closed (fixed) » Active

switching to active, but may need to create new issue.

indytechcook’s picture

Status: Active » Closed (fixed)

Please log a new issue @cosmicdreams and let me know how to reproduce it. I haven't seen it before.

bkoether’s picture

I'm seeing the same issue in connection with the bean_twitter_pull module. However beside the entry in the watchdog everything is working fine.
For some reason it expects the class that is defined in the include file to be a file on it's own.

willvincent’s picture

Yes this is in fact still an issue. More an annoyance than anything else as functionally the module still works.

However, enabling or disabling any module on the system, whether a bean related module or not, Causes watchdog messages like this:

Plugin bean of plugin type bean:types points to nonexistent file sites/all/modules/bean/BeanPlugin.class.php for class handler handler.
Plugin bean_default of plugin type bean:types points to nonexistent file sites/all/modules/bean/BeanDefault.class.php for class handler handler.

Both of these classes are actually in plugins/base.inc

That may be a problem. I was of the understanding that classes had to (or at least should) be in their own files. Clearly it's not even looking at the right directory either, since the file that contains the classes it's after are in the plugins subdirectory.

willvincent’s picture

Here's a patch that fixes this issue. Since without specifying the filename and path attributes, ctools assumes the filename is the handler classname appended with class.php, and that the path is simply the current path. It clearly wasn't finding the file it was looking for when its registry alter hook fires (ie: on module enable or disable).

See ctools/includes/registry.inc for the code that was causing the massive amount of watchdog errors.

By simply adding file and path attributes to hook_bean_types() definitions, we prevent this from occurring.

willvincent’s picture

Status: Closed (fixed) » Needs review
willvincent’s picture

Hmm, that still doesn't seem to correct the entire issue. :(

Status: Needs review » Needs work

The last submitted patch, prevent_excessive_watchdog_notices-1376902-8.p0.patch, failed testing.

willvincent’s picture

Status: Needs work » Needs review
StatusFileSize
new844 bytes

Another attempt at this patch to prevent excessive watchdog messages about non-existent files.

Status: Needs review » Needs work

The last submitted patch, prevent_excessive_watchdog_notices-1376902-12.patch, failed testing.

willvincent’s picture

Status: Needs work » Needs review
StatusFileSize
new768 bytes

Nope.. #12 doesn't do it either. After taking a closer look at the ctools registry.inc that's generating these watchdog messages, I think this patch may work, however.

willvincent’s picture

Version: 7.x-1.0-beta9 » 7.x-1.x-dev

Status: Needs review » Needs work

The last submitted patch, prevent_excessive_watchdog_notices-1376902-13.patch, failed testing.

willvincent’s picture

Status: Needs work » Needs review
StatusFileSize
new801 bytes

Ack, syntax errors. I'm failing hard on this patch.

willvincent’s picture

Erf.. one more time.

willvincent’s picture

Hmm.. well #18 seemed to work to a certain point, but doesn't work during site install, Trying again with more specific paths.

indytechcook’s picture

Status: Needs review » Needs work
+++ b/bean.moduleundefined
@@ -752,7 +752,9 @@ function bean_ctools_plugin_type() {
+          'file' => 'base.inc',
+          'path' => drupal_get_path('module', 'bean') .'/plugins',
         ),
       ),
     ),
@@ -768,6 +770,8 @@ function bean_bean_types() {

@@ -768,6 +770,8 @@ function bean_bean_types() {
   $plugins['bean'] = array(
     'handler' => array(
       'class' => 'BeanPlugin',
+      'file' => 'base.inc',
+      'path' => drupal_get_path('module', 'bean') .'/plugins',
     ),
   );
 
@@ -776,6 +780,8 @@ function bean_bean_types() {

@@ -776,6 +780,8 @@ function bean_bean_types() {
     'handler' => array(
       'class' => 'BeanDefault',
       'parent' => 'bean',
+      'file' => 'base.inc',
+      'path' => drupal_get_path('module', 'bean') .'/plugins',
     ),
   );
 

There should be a space between the . and '/plugins'.

willvincent’s picture

Status: Needs work » Needs review
StatusFileSize
new945 bytes

Added the space

mrfelton’s picture

Patch in #21 resolved for me.

indytechcook’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

primozsusa’s picture

Hello,
I am using bean 1.7 and also current 1.x dev it seams is newer and this should be fixed but i still get

Plugin addressfield_map_display of plugin type bean:types points to nonexistent file profiles/nc_base/modules/niceclouds/nc_addressfield_map/plugins/bean/AddressfieldMapDisplay.class.php for class handler handler.

in latest log...

my plugin definition is

  $plugins = array(
    'addressfield_map_display' => array(
      'label' => t('Addressfield map display'),
      'description' => t('Display address information on a map'),
      'handler' => array(
        'class' => 'AddressfieldMapDisplay',
        'parent' => 'bean',
      ),
       // same with or without this comments
      //'path' => $plugin_path,
      //'file' => 'addressfield_map_display.inc',
    ),
  );

cheers
Primoz