Closed (works as designed)
Project:
D7 Media
Version:
7.x-2.0-unstable2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2011 at 05:12 UTC
Updated:
2 Dec 2011 at 23:15 UTC
It looks like there's some code that flattens the 'handler' part of the array (which is where ctools expects these definitions) that's clobbering the 'file' value. I'm too tired to look for it right now, maybe some time this week.
The definition:
$plugins['media_browser_plugin'] = array(
'title' => t('title'),
'weight' => -10,
'handler' => array(
'path' => drupal_get_path('module', 'media_browser_plugin') . '/includes',
'file' => 'MediaBrowserPlugin.inc',
'class' => 'MediaBrowserPlugin',
),
'access callback' => 'media_browser_plugin_access',
);
and this is what is getting passed to ctools:
Array
(
[title] => Video
[handler] => Array
(
[path] => sites/all/modules/media_browser_plugin/includes
[file] => MediaBrowserPlugin.inc
[class] => MediaBrowserPlugin
)
[access callback] => media_browser_Plugin_access
[module] => media_browser_plugin
[name] => media_browser_plugin
[path] => sites/all/modules/media_browser_plugin
[file] =>
[plugin module] => media
[plugin type] => browser
)
Comments
Comment #1
dlumberg commentedNevermind, the file has to be included in the module.info file.